Skip to content

Fix vertical metric calculations and layout. - #329

Merged
JimBobSquarePants merged 2 commits into
mainfrom
js/vertical-layout-fixes
Apr 30, 2023
Merged

Fix vertical metric calculations and layout.#329
JimBobSquarePants merged 2 commits into
mainfrom
js/vertical-layout-fixes

Conversation

@JimBobSquarePants

Copy link
Copy Markdown
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

While working on the updates to Drawing to allow rendering of vertically rotated fonts I discovered that we were still not rendering vertical fonts correctly for all fonts nor correctly placing the decorations.

This PR fixes both the metrics calculation and the layout. Prior iterations incorrectly negatively vertically offset the Hangul font NotoSansKR-Regular.otf.

CanDrawTextVerticalMixed_Rgba32_Blank500x400

CanDrawTextVertical_Rgba32_Blank500x400

@JimBobSquarePants JimBobSquarePants added this to the 1.0.0 milestone Apr 30, 2023
@codecov

codecov Bot commented Apr 30, 2023

Copy link
Copy Markdown

Codecov Report

Merging #329 (3fe2792) into main (1d25ba0) will increase coverage by 0%.
The diff coverage is 81%.

@@          Coverage Diff          @@
##            main    #329   +/-   ##
=====================================
  Coverage     83%     83%           
=====================================
  Files        227     227           
  Lines      12838   12832    -6     
  Branches    1844    1842    -2     
=====================================
+ Hits       10734   10738    +4     
+ Misses      1663    1653   -10     
  Partials     441     441           
Flag Coverage Δ
unittests 83% <81%> (+<1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/SixLabors.Fonts/GlyphMetrics.cs 60% <6%> (+<1%) ⬆️
src/SixLabors.Fonts/Bounds.cs 89% <100%> (ø)
src/SixLabors.Fonts/Glyph.cs 100% <100%> (ø)
src/SixLabors.Fonts/GlyphLayout.cs 84% <100%> (+<1%) ⬆️
src/SixLabors.Fonts/StreamFontMetrics.cs 86% <100%> (+2%) ⬆️
...es/AdvancedTypographic/AdvancedTypographicUtils.cs 92% <100%> (+<1%) ⬆️
.../SixLabors.Fonts/Tables/Cff/CffEvaluationEngine.cs 53% <100%> (-1%) ⬇️
src/SixLabors.Fonts/Tables/Cff/CffGlyphMetrics.cs 91% <100%> (+<1%) ⬆️
...bors.Fonts/Tables/Cff/TransformingGlyphRenderer.cs 62% <100%> (+8%) ⬆️
...bors.Fonts/Tables/TrueType/TrueTypeGlyphMetrics.cs 97% <100%> (+<1%) ⬆️
... and 2 more

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@JimBobSquarePants
JimBobSquarePants merged commit 55d489c into main Apr 30, 2023
@JimBobSquarePants
JimBobSquarePants deleted the js/vertical-layout-fixes branch April 30, 2023 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants