Diacritical marks disappear in Safari and Chrome on iOS

Kazunari TsuboiKazunari Tsuboi Posts: 7
edited June 29 in Font Technology
This is my first time posting, so I'm a little nervous...

I am puzzled by unintended rendering results on iOS (both Safari and Chrome).
The diacritic at the beginning of the line disappears.

This font has the glyphs A(U+0041), Circumflex(U+0302) and Acircumflex(u+00C2).
All characters in the image are the same Acircumflex(U+00C2).
Created using AFDKO makeotf v2.7.11.
The TTF is displayed in a browser. I converted it to woff and got the same display result again.

I used the GSUB ccmp feature to break up the combined characters into base and diacritics.
The intent of this is to represent the multiple diacritics in a single glyph.

lookup CCMP_decomp{
    sub Acircumflex by A Circumflex;
} CCMP_decomp;

lookup CCMP_diaclig{
    sub Circumflex Acute by Circumflexacute;
} CCMP_diaclig;

feature ccmp {
	lookup CCMP_decomp;
	lookup CCMP_diaclig;
} ccmp;

Is this a bug? Is it because I'm using ccmp incorrectly?
I would like to know some information that would help me understand shaping in iOS.

Comments

  • Erwin DenissenErwin Denissen Posts: 210
    I see no problems in your font, but that is based on the information you provided so far.

    Do you see a mark after the last A in your lines? Are your marks positioned to the left of x=0 and is their advance width zero?
  • Thank you for your reply.

    There is no mark at the end of the line.


    The width is zero. The position of the mark is as follows.

  • So, you decompose, but you don't recompose any base-mark ligature. (You do compose a ligature for circumflex + acute, but there's no acute in your text sequence.)

    You have the default placement of the circumflex overhanging to the right. Have you added any positioning lookups?
  • mark and mkmk feature are set.



    I changed the default position to the left. Even so, the result does not change.
    The diacritic at the beginning of the line disappears...


  • Maybe @Simon Cozens Crowbar app would be helpful in debugging. (See here.)
  • Erwin DenissenErwin Denissen Posts: 210
    If the font works just fine elsewhere, than it might be a iOS bug.

    FontCreator comes with an OpenType proofing tool, and allows you to visually edit your OpenType layout features. You can also code them, choosing between OTLFD, FEA, and VOLT syntax.
  • Kazunari TsuboiKazunari Tsuboi Posts: 7
    edited June 30
    Thanks for all the information, Crowbar is a great tool. It has helped me a lot.
    I've had no problems displaying each browser on Windows and Linux.
    I'm having the same problem with Chrome, Safari and Firefox running on iOS.  So it seems to be an iOS issue.

    For the record, I'm posting my experiment.

    I put a symbol on Acircumflex(U+00C2)
    Interestingly, I found that ccmp is not working after the second character.


    Decomposition using GSUB Lookup Type 6
    feature ccmp {
    	sub Acircumflex' lookup CCMP_decomp;
    } ccmp;
    It was the same display result.

    Decomposition using GSUB Lookup Type 6 (Used classes)
    feature ccmp {
    	sub @AllGlyphs Acircumflex' lookup CCMP_decomp;
    } ccmp;
    The second character's diacritic will now disappear. The characters that follow will show the combined characters.


  • I have found a workaround.I was able to work around the problem by using Lookup Type 6 instead of Lookup Type 2.
    I decided to disassemble when a mark comes after the component character.
    By doing this, the desired display result was obtained.
    Thank you for your advice!

    lookup CCMP_Decomp{
    	sub Acircumflex by A Circumflex;
    } CCMP_Decomp;
    
    feature ccmp {
    	sub Acircumflex' lookup CCMP_Decomp @CombiningTopAccents;
    
    	lookup CCMP_Diacs{
    		lookupflag UseMarkFilteringSet @CombiningTopAccents;
                    sub Circumflex Acute by Circumflexacute;
    	} CCMP_Diacs;
    
    } ccmp;

Sign In or Register to comment.