Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement CSS-style font size algorithm #5123

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

Commits on Apr 23, 2022

  1. Configuration menu
    Copy the full SHA
    3ac831a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9bd7ff8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9c43cdf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a8806ca View commit details
    Browse the repository at this point in the history
  5. Update getGlyphHeight to take post-scaling glyph size instead

    Also renames the field to become `useFullGlyphHeight` to better reflect
    what it actually does here, also matches with `SpriteText.UseFullGlyphHeight`.
    
    If I understand this properly, when setting this to false, it should
    take the glyph's texture height instead so that text get properly
    centered, but for some reason it's still including `YOffset` which could
    leave an empty area at the top of the text.
    frenzibyte committed Apr 23, 2022
    Configuration menu
    Copy the full SHA
    4748535 View commit details
    Browse the repository at this point in the history
  6. Update AddNewLine to insert post-scaling glyph height on empty line

    This one required a bit more work as CSS usually takes the "glyph scale"
    of the font specified in the `font-family` as far as my manual testing went.
    
    I think it should be fine to create a `GetFont` method returning
    `IGlyphStore`s for that purpose, as it's also required in visual testing
    to visualise the baseline position in a sprite text.
    frenzibyte committed Apr 23, 2022
    Configuration menu
    Copy the full SHA
    f59391e View commit details
    Browse the repository at this point in the history
  7. Add test coverage

    frenzibyte committed Apr 23, 2022
    Configuration menu
    Copy the full SHA
    d194b8d View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    07cef08 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b2370e5 View commit details
    Browse the repository at this point in the history
  10. Fix wrong font metrics for test "Noto" font

    This doesn't affect the test scene since the scaling is based on the
    name of the font specified for the `SpriteText`. Same for CSS as far as
    I've tested.
    frenzibyte committed Apr 23, 2022
    Configuration menu
    Copy the full SHA
    78d32b6 View commit details
    Browse the repository at this point in the history
  11. Reference computation of "height of each individual glyph"

    Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
    frenzibyte and bdach authored Apr 23, 2022
    Configuration menu
    Copy the full SHA
    914f81b View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    6c6ec9e View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    6113bb3 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    82ca32d View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2022

  1. Configuration menu
    Copy the full SHA
    2f01659 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2022

  1. Configuration menu
    Copy the full SHA
    252a680 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4cdf9a0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    aaca14b View commit details
    Browse the repository at this point in the history

Commits on May 10, 2022

  1. Configuration menu
    Copy the full SHA
    9aa1c7e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cf7a7f6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e34c364 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    aa38a93 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f06c141 View commit details
    Browse the repository at this point in the history
  6. Fix out-of-sync constructor xmldoc

    `inheritdoc` is a life saver.
    frenzibyte committed May 10, 2022
    Configuration menu
    Copy the full SHA
    a6a41bf View commit details
    Browse the repository at this point in the history
  7. css -> cssScaling

    frenzibyte committed May 10, 2022
    Configuration menu
    Copy the full SHA
    fecd0ee View commit details
    Browse the repository at this point in the history