Skip to content

Fix composite glyph transform parsing. - #339

Merged
JimBobSquarePants merged 2 commits into
mainfrom
js/fix-composite-glyphs
Jun 29, 2023
Merged

Fix composite glyph transform parsing.#339
JimBobSquarePants merged 2 commits into
mainfrom
js/fix-composite-glyphs

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

Fixes #334

The wrong property was being set on the transformation matrix when loading the composite glyph.

I used ttfdump to parse the font to determine the correct transform after ensuring there was no shaping taking place and realized then something was amiss.

Glyph    612.
	 numberOfContours:	 -1  (Composite)
	 xMin:			 31
	 yMin:			 -279
	 xMax:			 295
	 yMax:			 768

	 0: Flags:	 0x22
	    Glyf Index:	 748
	    X BOffset:	 31
	    Y BOffset:	 0
	    Others:	                                                   

	 1: Flags:	 0x10b
	    Glyf Index:	 613
	    X WOffset:	 306
	    Y WOffset:	 489
	    X,Y Scale:	 -1.000000
	    Others:	                                                   


	 Length of Instructions:  6

Here's the rendered output following the fix.
sumana

@codecov

codecov Bot commented Jun 27, 2023

Copy link
Copy Markdown

Codecov Report

Merging #339 (1696aff) into main (960f46c) will not change coverage.
The diff coverage is 100%.

❗ Current head 1696aff differs from pull request most recent head 956f8c4. Consider uploading reports for the commit 956f8c4 to get more accurate results

@@          Coverage Diff          @@
##            main    #339   +/-   ##
=====================================
  Coverage     83%     83%           
=====================================
  Files        227     227           
  Lines      12859   12859           
  Branches    1839    1838    -1     
=====================================
  Hits       10772   10772           
  Misses      1652    1652           
  Partials     435     435           
Flag Coverage Δ
unittests 83% <100%> (ø)

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

Impacted Files Coverage Δ
...bors.Fonts/Tables/AdvancedTypographic/GSubTable.cs 92% <100%> (ø)
...nts/Tables/TrueType/Glyphs/CompositeGlyphLoader.cs 100% <100%> (ø)

... and 2 files with indirect coverage changes

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

@JimBobSquarePants
JimBobSquarePants merged commit b2396dc into main Jun 29, 2023
@JimBobSquarePants
JimBobSquarePants deleted the js/fix-composite-glyphs branch June 29, 2023 07:38
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.

Problem with font "Sumana", wrong left parenthesis character

2 participants