Closed JimBobSquarePants closed 1 year ago
Merging #327 (33186a2) into main (2a7c8a9) will decrease coverage by
1%
. The diff coverage is72%
.
@@ Coverage Diff @@
## main #327 +/- ##
======================================
- Coverage 83% 83% -1%
======================================
Files 224 227 +3
Lines 12437 12838 +401
Branches 1792 1844 +52
======================================
+ Hits 10420 10734 +314
- Misses 1597 1663 +66
- Partials 420 441 +21
Flag | Coverage Δ | |
---|---|---|
unittests | 83% <72%> (-1%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
src/SixLabors.Fonts/FontMetrics.cs | 100% <ø> (ø) |
|
src/SixLabors.Fonts/FontRectangle.cs | 95% <ø> (+5%) |
:arrow_up: |
src/SixLabors.Fonts/Glyph.cs | 100% <ø> (ø) |
|
...nts/Tables/AdvancedTypographic/GPos/AnchorTable.cs | 33% <0%> (-2%) |
:arrow_down: |
src/SixLabors.Fonts/TextRenderer.cs | 100% <ø> (ø) |
|
...ode/Resources/VerticalOrientationTrie.Generated.cs | 100% <ø> (ø) |
|
src/SixLabors.Fonts/GlyphMetrics.cs | 60% <13%> (-13%) |
:arrow_down: |
src/SixLabors.Fonts/Font.cs | 53% <33%> (-1%) |
:arrow_down: |
...bors.Fonts/Tables/AdvancedTypographic/GPosTable.cs | 84% <50%> (+<1%) |
:arrow_up: |
src/SixLabors.Fonts/GlyphRendererParameters.cs | 60% <60%> (+1%) |
:arrow_up: |
... and 24 more |
... and 1 file with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Prerequisites
Description
Provides an implementation of Unicode Standard Annex #50 Unicode Vertical Text Layout
There's a lot going on here.
LayoutMode.VerticalMixedLeftRight
andLayoutMode.VerticalMixedRightLeft
FontMetrics
properties into separateHorizontalMetrics
andVerticalMetrics
types since they can be different.CodePoint
for the detection of a newVerticalOrientationType
that provides guidance to how the glyph should be laid out.Here's some of the output.
Note. I performed various comparisons across different browsers and Microsoft Word. As expected, they all had their own slight twist on where exactly the decorators should be rendered for vertical fonts. It seems the ones in the font themselves are ignored. I based my implementation on the Chromium implementation however I am using the horizontal metrics for rotated horizontal fonts as they are still correctly relative to the baseline.
I had to do a local update to ImageSharp.Drawing to update the renderers there to handle vertical decorators but I will do a follow up PR to handle that.
Mixed English and Japanese using Segoi UI and Microsoft YaHei (TTF)
Mixed English and Emoji using Segoe UI and Segoe UI Emoji
Mixed English and Japanese using Source Sans ProI and Microsoft YaHei (CFF)