Author Topic: Text alignment in AM is completely off [SOLUTION]  (Read 5074 times)

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Text alignment in AM is completely off [SOLUTION]
« on: March 12, 2017, 07:51:49 AM »
Is there any way to make text alignment in AM more coder friendly?
Setting Align.Left does not make the text to be aligned to the left. The y offset is wrong too. What's even worse the gap changes depending on the font type used, so it's practicaly impossible in AM to make a neat theme which scales to various resolutions. I need to compensate the gap and vertical alignment manually in pixels which destroys scalability.

« Last Edit: March 17, 2017, 07:06:43 AM by Oomek »

bjose2345

  • Sr. Member
  • ****
  • Posts: 107
    • View Profile
Re: text alignment in AM is completely off
« Reply #1 on: March 12, 2017, 08:24:22 AM »
« Last Edit: March 12, 2017, 08:52:01 AM by bjose2345 »

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: text alignment in AM is completely off
« Reply #2 on: March 12, 2017, 12:30:52 PM »
I'm aware of that wiki page. Unfortunately it doesn't explain how to overcome the misalignment of text in relation to the text box

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: text alignment in AM is completely off
« Reply #3 on: March 17, 2017, 07:04:00 AM »
Well, after few failed attempts to overcome the issue I 've decided to fork AM and fix it myself.



https://www.youtube.com/watch?v=ULSgTj53ke4

https://github.com/mickelson/attract/pull/331/files

It's up to mickelson now if he wants to include it in his build.

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: Text alignment in AM is completely off [SOLUTION]
« Reply #4 on: March 17, 2017, 08:27:22 PM »
just wanted to say thanks...looks like you really know what your doing.
good work . going to read up.....on it and use..
help a friend....

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 861
    • View Profile
    • new projects
Re: Text alignment in AM is completely off [SOLUTION]
« Reply #5 on: March 18, 2017, 03:27:54 AM »
This is soooo awesome. It was always trial-and-error approach with text alignment. Like tweak-reload-tweak-reload-and so on. It's doable - but you have always make correction for text placement.

It will surely help with precise text positioning.

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: Text alignment in AM is completely off [SOLUTION]
« Reply #6 on: March 18, 2017, 10:51:40 AM »
Now we just have to convince raygun to accept my pull request on github.

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 861
    • View Profile
    • new projects
Re: Text alignment in AM is completely off [SOLUTION]
« Reply #7 on: March 18, 2017, 11:01:03 AM »
Is he against it? Or you didn't ask yet?

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: Text alignment in AM is completely off [SOLUTION]
« Reply #8 on: March 18, 2017, 11:02:23 AM »
He probably didn't see it yet. He's not active recently on either AM forum or GitHub

Oomek

  • Administrator
  • Sr. Member
  • *****
  • Posts: 311
  • Radek Dutkiewicz
    • View Profile
    • github.com/oomek
Re: Text alignment in AM is completely off [SOLUTION]
« Reply #9 on: March 18, 2017, 06:04:56 PM »
Example of improvements in small thin font rendering.
As you can see only character size:20 is rendered properly.
On the left AM Baseline, on the right my build.

Make sure your browser has zoom set at 100% and your windows dpi settings are at 100% as well.
Otherwise all fonts will appear as interpolated.