bugThe FreeType Project - Bugs: bug #52532, OT Variations: cvar with shared...

 
 

bug #52532: OT Variations: cvar with shared points fails

Submitted by:  None
Submitted on:  Mon 27 Nov 2017 04:03:38 PM UTC  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.8.2

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 05 Dec 2017 05:45:51 PM UTC, comment #9:

Looks good, thank you!

Jens Kutilek <jkutilek>
Mon 04 Dec 2017 11:37:10 AM UTC, comment #8:

Thanks a lot! Should now be fixed in git, please test.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Mon 04 Dec 2017 10:08:26 AM UTC, comment #7:

PS: Latest freetype version from the git repository (c18c391b688a59a1c1e8366e216e473c1bd6361c)

Jens Kutilek <jkutilek>
Mon 04 Dec 2017 10:06:57 AM UTC, comment #6:

I have attached two images from ftmulti.

The correct rendering is indeed the "noshared" version, and you are right, both should identical because the only difference is in the structure of point packing in the cvar table.

The renderings were produced with:
<tt>ftmulti -d 24 32 VotoSerifGX-IUP-gvar-cvar_noshared.ttf</tt>
<tt>ftmulti -d 24 32 VotoSerifGX-IUP-gvar-cvar.ttf</tt>

Jens Kutilek <jkutilek>
Sun 03 Dec 2017 08:36:25 AM UTC, comment #5:

While playing around with the two fonts I don't get a difference in rendering, not being able to reproduce the shown effect in the image. Obviously, I'm doing something wrong...

Please provide two images with exact axis values for a given ppem size (ideally using ftmulti or ftgrid) that shows how the shared and no-shared variants look like with FreeType (also providing the exact version information).

I assume that the results of no-shared are the right ones, and the other font should produce the same, right?

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Fri 01 Dec 2017 06:19:16 PM UTC, comment #4:

As far as getting hinted outlines, it appears that the issue is that at https://github.com/unicode-org/text-rendering-tests/blob/3276936544a01ed15ee30fd5caae3b268a7d7d0f/src/fonttest/freestack_font.cpp#L98 the test is specifically loading the glyph with FT_LOAD_NO_HINTING. If you want to get bytecode hinted paths or unhinted paths (it appears you don't really want to test the auto-hinter here) you'll want FT_LOAD_NO_AUTOHINT instead, I think. Hinting happens mostly to the path (some drop out stuff also applies to rasterizing).

bungeman <bungeman>
Wed 29 Nov 2017 04:56:26 PM UTC, comment #3:

I tried adding test cases to the Unicode test suite for text rendering:
https://rawgit.com/unicode-org/text-rendering-tests/master/reports/FreeStack.html#CVAR-1

However, FreeType still passes the CVAR tests. My test framework works by asking FreeType (and the other implementations under test) for outlines, and then it converts those outlines to SVG. Apparently, FreeType returns unhinted outlines, which of course makes total sense for most applications. For the test suite, however, it would actually be nice if there was some way to get hinted outlines. Is there a way to do that? (If not, it’s no big deal; this bug can surely be reproduced otherwise).

Anonymous
Tue 28 Nov 2017 10:33:27 AM UTC, comment #2:

I have added the test fonts to the Unicode rendering tests on GitHub:

https://github.com/unicode-org/text-rendering-tests/pull/44

Anonymous
Mon 27 Nov 2017 04:05:28 PM UTC, comment #1:

The quote from the OT spec was cut off, this is the full text:

PRIVATE_POINT_NUMBERS Flag indicating that the serialized data for this tuple variation table includes packed “point” number data. If set, this tuple variation table uses that number data; if clear, this tuple variation table uses shared number data found at the start of the serialized data for this glyph variation data or 'cvar' table.

Anonymous
Mon 27 Nov 2017 04:03:38 PM UTC, original submission:

http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/truetype/ttgxvar.c#n3014

/* The documentation implies there are flags packed into */
/* `tupleCount', but John Jenkins says that shared points don't apply */
/* to `cvar', and no other flags are defined. */

It looks like John Jenkins wasn't right. Per the OT spec 1.8, shared points apply to cvar. Freetype doesn't handle this correctly, see attached fonts and image.

Both TTFs are compiled from the same ttx file with the Python FontTools. The one which looks reverse-contrast has cvar shared ‘points’ (actually they’re CVTs) on, the one which looks normal doesn't use shared points.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #42564:  ftmulti-cvar-noshared.png added by jkutilek (10KiB - image/png - Test renderings from ftmulti)
file #42565:  ftmulti-cvar-shared.png added by jkutilek (10KiB - image/png - Test renderings from ftmulti)
file #42498:  VotoSerif_cvar.zip added by None (60KiB - application/zip)
file #42499:  cvar-shared.png added by None (60KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jkutilek (Updated the item)
  • -unavailable- added by wl (Posted a comment)
  • -unavailable- added by bungeman (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 04 Dec 2017 11:37:10 AM UTCwlStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.8.2
    Mon 04 Dec 2017 10:03:24 AM UTCjkutilekAttached File-=>Added ftmulti-cvar-noshared.png, #42564
      Attached File-=>Added ftmulti-cvar-shared.png, #42565
    Sun 03 Dec 2017 08:36:25 AM UTCwlStatusNone=>Need Info
      Assigned toNone=>wl
    Mon 27 Nov 2017 04:03:38 PM UTCNoneAttached File-=>Added VotoSerif_cvar.zip, #42498
      Attached File-=>Added cvar-shared.png, #42499

    Back to the top


    Powered by Savane 3.1-cleanup1