Glyph Coordinate Bounds

Post your bug reports here. Include information that helps us to understand and reproduce the bug.
Post Reply
ClintGoss
Posts: 46
Joined: Mon Nov 06, 2017 2:18 pm

Glyph Coordinate Bounds

Post by ClintGoss » Sun Apr 21, 2019 3:12 pm

I seem to be hitting some issues in FC Pro 11.5.0.2430 on Win7x64 with fonts that have very large glyphs.

It appears that coordinate points of a glyph are bounded by -32,768 to +32,767 (I can't find this in the OTSpec, and I've asked this question in the FontCreator - Support forum under the title Max Size of a Glyph, ... but I think that's a reasonable assumption given the int16 declaration for point coordinates).

FC shows a working grid of with X and Y ranges bounded by -16,383 to +16,383, but allows you to move points pretty much anywhere. You can't scroll past the working grid bounds, but you can zoom (way) out and happily move points anywhere off the grid, even beyond 64K bounds. FC will save such modifications to .fcp files and read them back in OK, but then on export to .ttf, the affected contours get badly mangled (as you might expect).

* Should FC have some check / guard against points with out-of-bounds coordinates?

* Could the working grid be expanded to accommodate the full range of -32,768 to +32,767?

I'm working with Arabic fonts that have glyphs with contours that extend out to about +23,000 (with a UPM of 2048), so this is not a pathological case. One such font is Khaled Hosny's Amiri Regular, glyph #6781 (which is unmapped and simple, but used in composite glyphs). I have attached that font, since it is OFL.

- Clint
Attachments
Amiri-Regular_Amiri_0.111_2018_OFL.ttf
Font with example of wide glyph #6781
(538.63 KiB) Downloaded 8 times

Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 8232
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Glyph Coordinate Bounds

Post by Bhikkhu Pesala » Sun Apr 21, 2019 6:12 pm

You may not get a reply from Erwin until after the Easter break.

I can confirm the issue. There is a category in the Overview side panel for glyphs with outline issues.

You could temporarily move the offending contours by a round number of funits using the Transform Toolbar so that you can work on it, then move it back again, but that is not going to fix issues with exported fonts. Perhaps making any composite glyphs that use the simple glyph as members into simple glyphs might fix it. Scaling and rotation of component glyphs is know to cause issue, so it is recommended to make them simple before export.
My FontsReviews: MainTypeFont CreatorHelpFC12 Pro + MT8.0 @ Win10 1809 build 17763.557

ClintGoss
Posts: 46
Joined: Mon Nov 06, 2017 2:18 pm

Re: Glyph Coordinate Bounds

Post by ClintGoss » Sun Apr 21, 2019 6:31 pm

Thanks for that! ...

I never thought of transform / moving the contours into "safe space" and then sliding them back ... btw, it looks like, as long as the contours are within -32,768 to +32,767, the exported font is AOK.
Scaling and rotation of component glyphs is know to cause issue, so it is recommended to make them simple before export.
Hmmm. Is there more detail on this? (another post??) I have not seen this, and some of the fonts I work with have composite glyphs 5 levels deep (ugh).

Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 8232
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Glyph Coordinate Bounds

Post by Bhikkhu Pesala » Sun Apr 21, 2019 6:40 pm

See this thread, for example.
My FontsReviews: MainTypeFont CreatorHelpFC12 Pro + MT8.0 @ Win10 1809 build 17763.557

Erwin Denissen
Moderator
Moderator
Posts: 8182
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Glyph Coordinate Bounds

Post by Erwin Denissen » Wed Apr 24, 2019 7:40 am

With over 20 years of code, it is possible this is legacy, but I'm not sure.

If more people are in need of a larger grid, then we might take time to look into this.
Erwin Denissen
High-Logic
Proven Font Technology

Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 8232
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Glyph Coordinate Bounds

Post by Bhikkhu Pesala » Wed Apr 24, 2019 8:17 am

I see this issue with a couple of large glyphs in my Odana font. I did not notice any problem with the exported font.
Outline Issues.png
Outline Issues.png (32.17 KiB) Viewed 168 times
My FontsReviews: MainTypeFont CreatorHelpFC12 Pro + MT8.0 @ Win10 1809 build 17763.557

ClintGoss
Posts: 46
Joined: Mon Nov 06, 2017 2:18 pm

Re: Glyph Coordinate Bounds

Post by ClintGoss » Wed Apr 24, 2019 2:15 pm

I too have see no problems with exported fonts ... and the work-around you suggested is AOK. The only problem would be if data points exceed the +/- 32K limit, which is really extreme.

I'm thinking this is definitely a low-priority issue, and not worth risking the issues that might crop up from expanding the working grid.

I only hit this when scaling an Arabic font to adjust its UPM when importing it's glyphs into another, higher-UPM, font.

-Clint

Post Reply