SixLabors / ImageSharp.Drawing

:pen: Extensions to ImageSharp containing a cross-platform 2D polygon manipulation API and drawing operations.
https://sixlabors.com/products/imagesharp-drawing/
Other
285 stars 38 forks source link

Support Vertical Mixed Text #271

Closed JimBobSquarePants closed 1 year ago

JimBobSquarePants commented 1 year ago

Prerequisites

Description

Updates the glyph renderers to handle support for Unicode Standard Annex #50 Unicode Vertical Text Layout

Note: I've discovered an issue when rendering the decorations over certain CFF fonts in that holes are left, however I'm unable to determine what the cause could be. The paths themselves look ok.

This only affects filling a glyph collection.

codecov[bot] commented 1 year ago

Codecov Report

Merging #271 (dbb1ef6) into main (f72bd7a) will increase coverage by 0%. The diff coverage is 90%.

@@         Coverage Diff         @@
##           main   #271   +/-   ##
===================================
  Coverage    78%    79%           
===================================
  Files        97     97           
  Lines      5065   5088   +23     
  Branches    932    945   +13     
===================================
+ Hits       3983   4025   +42     
+ Misses      898    875   -23     
- Partials    184    188    +4     
Flag Coverage Δ
unittests 79% <90%> (+<1%) :arrow_up:

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

Impacted Files Coverage Δ
...ImageSharp.Drawing/Shapes/Text/BaseGlyphBuilder.cs 88% <77%> (+31%) :arrow_up:
...rocessing/Processors/Text/RichTextGlyphRenderer.cs 95% <100%> (+<1%) :arrow_up:

... and 1 file with indirect coverage changes

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

JimBobSquarePants commented 1 year ago

@tocsoft I couldn't help myself and implemented the smart pixel clamping I was on about in a manner that allowed preserving defined pen thickness. The results look great 😁