aliftype / reem-kufi

Reem Kufi (كوفي ريم) is a modern kufic typeface
SIL Open Font License 1.1
82 stars 11 forks source link

Preparing Reem Kufi Ink for Google Fonts #32

Closed yanone closed 2 years ago

yanone commented 2 years ago

I checked out your new fonts, and sadly have to report that only the Regular is looking nicely as it should, while the Bold shows a semi-transparent (see joints) black outline. See below.

Please keep this issue open until everything is resolved. Thank you.

Bildschirmfoto 2022-04-13 um 10 43 04 Bildschirmfoto 2022-04-13 um 10 43 10

Also, the following fontbakery fails are relevant:

 >> com.google.fonts/check/smart_dropout
    Font enables smart dropout control in "prep" table instructions?
    with ReemKufiInk-Bold.ttf

      Rationale:                                                                
      This setup is meant to ensure consistent rendering quality for fonts      
      across all devices (with different rendering/hinting capabilities).       

      Below is the snippet of instructions we expect to see in the fonts:       
      B8 01 FF    PUSHW 0x01FF                                                  
      85          SCANCTRL (unconditinally turn on                              
                            dropout control mode)                               
      B0 04       PUSHB 0x04                                                    
      8D          SCANTYPE (enable smart dropout control)                       

      "Smart dropout control" means activating rules 1, 2 and 5:                
      Rule 1: If a pixel's center falls within the glyph outline,               
              that pixel is turned on.                                          
      Rule 2: If a contour falls exactly on a pixel's center,                   
              that pixel is turned on.                                          
      Rule 5: If a scan line between two adjacent pixel centers                 
              (either vertical or horizontal) is intersected                    
              by both an on-Transition contour and an off-Transition            
              contour and neither of the pixels was already turned on           
              by rules 1 and 2, turn on the pixel which is closer to            
              the midpoint between the on-Transition contour and                
              off-Transition contour. This is "Smart" dropout control.          

      For more detailed info (such as other rules not enabled in this snippet), 
      please refer to the TrueType Instruction Set documentation.               

     FAIL The 'prep' table does not contain TrueType                            
          instructions enabling smart dropout control. To fix, export the font  
          with autohinting enabled, or run ttfautohint on the font, or run the  
          gftools fix-nonhinting script. [code: lacks-smart-dropout]            

    Result: FAIL

 >> com.google.fonts/check/smart_dropout
    Font enables smart dropout control in "prep" table instructions?
    with ReemKufiInk-Regular.ttf

      Rationale:                                                                
      This setup is meant to ensure consistent rendering quality for fonts      
      across all devices (with different rendering/hinting capabilities).       

      Below is the snippet of instructions we expect to see in the fonts:       
      B8 01 FF    PUSHW 0x01FF                                                  
      85          SCANCTRL (unconditinally turn on                              
                            dropout control mode)                               
      B0 04       PUSHB 0x04                                                    
      8D          SCANTYPE (enable smart dropout control)                       

      "Smart dropout control" means activating rules 1, 2 and 5:                
      Rule 1: If a pixel's center falls within the glyph outline,               
              that pixel is turned on.                                          
      Rule 2: If a contour falls exactly on a pixel's center,                   
              that pixel is turned on.                                          
      Rule 5: If a scan line between two adjacent pixel centers                 
              (either vertical or horizontal) is intersected                    
              by both an on-Transition contour and an off-Transition            
              contour and neither of the pixels was already turned on           
              by rules 1 and 2, turn on the pixel which is closer to            
              the midpoint between the on-Transition contour and                
              off-Transition contour. This is "Smart" dropout control.          

      For more detailed info (such as other rules not enabled in this snippet), 
      please refer to the TrueType Instruction Set documentation.               

     FAIL The 'prep' table does not contain TrueType                            
          instructions enabling smart dropout control. To fix, export the font  
          with autohinting enabled, or run ttfautohint on the font, or run the  
          gftools fix-nonhinting script. [code: lacks-smart-dropout]            

    Result: FAIL

 >> com.google.fonts/check/family/win_ascent_and_descent
    Checking OS/2 usWinAscent & usWinDescent.
    with ReemKufiInk-Bold.ttf

      Rationale:                                                                
      A font's winAscent and winDescent values should be greater than the head  
      table's yMax, abs(yMin) values. If they are less than these values,       
      clipping can occur on Windows platforms                                   
      (https://github.com/RedHatBrand/Overpass/issues/33).                      

      If the font includes tall/deep writing systems such as Arabic or          
      Devanagari, the winAscent and winDescent can be greater than the yMax and 
      abs(yMin) to accommodate vowel marks.                                     

      When the win Metrics are significantly greater than the upm, the          
      linespacing can appear too loose. To counteract this, enabling the OS/2   
      fsSelection bit 7 (Use_Typo_Metrics), will force Windows to use the OS/2  
      typo values instead. This means the font developer can control the        
      linespacing with the typo values, whilst avoiding clipping by setting the 
      win values to values greater than the yMax and abs(yMin).                 

     FAIL OS/2.usWinDescent value should be equal or greater                    
          than 700, but got 400 instead. [code: descent]                        

    Result: FAIL

 >> com.google.fonts/check/valid_glyphnames
    Glyph names are all valid?
    with ReemKufiInk-Bold.ttf

      Rationale:                                                                
      Microsoft's recommendations for OpenType Fonts states the following:      

      'NOTE: The PostScript glyph name must be no longer than 31 characters,    
      include only uppercase or lowercase English letters, European digits, the 
      period or the underscore, i.e. from the set [A-Za-z0-9_.] and should start
      with a letter, except the special glyph name ".notdef" which starts with a
      period.'                                                                  

      https://docs.microsoft.com/en-us/typography/opentype/spec/recom#post-table

      In practice, though, particularly in modern environments, glyph names can 
      be as long as 63 characters.                                              
      According to the "Adobe Glyph List Specification" available at:           

      https://github.com/adobe-type-tools/agl-specification                     

     FAIL The following glyph names do not comply with naming                   
          conventions: hamza-ar, highhamza-ar, alef-ar, alef-ar.1, alef-ar.2,   
          alef-ar.3, alef-ar.fina, alef-ar.fina.Lam, alef-ar.fina.Lam.1,        
          behDotless-ar and 349 more.                                           

          Use -F or --full-lists to disable shortening of long lists.           

          A glyph name must be entirely comprised of characters from the        
          following set: A-Z a-z 0-9 .(period) (underscore). A glyph name must  
          not start with a digit or period. There are a few exceptions such as  
          the special glyph ".notdef". The glyph names "twocents", "a1", and "" 
          are all valid, while "2cents" and ".twocents" are not. [code:         
          found-invalid-names]                                                  

    Result: FAIL

 >> com.google.fonts/check/family/win_ascent_and_descent
    Checking OS/2 usWinAscent & usWinDescent.
    with ReemKufiInk-Regular.ttf

      Rationale:                                                                
      A font's winAscent and winDescent values should be greater than the head  
      table's yMax, abs(yMin) values. If they are less than these values,       
      clipping can occur on Windows platforms                                   
      (https://github.com/RedHatBrand/Overpass/issues/33).                      

      If the font includes tall/deep writing systems such as Arabic or          
      Devanagari, the winAscent and winDescent can be greater than the yMax and 
      abs(yMin) to accommodate vowel marks.                                     

      When the win Metrics are significantly greater than the upm, the          
      linespacing can appear too loose. To counteract this, enabling the OS/2   
      fsSelection bit 7 (Use_Typo_Metrics), will force Windows to use the OS/2  
      typo values instead. This means the font developer can control the        
      linespacing with the typo values, whilst avoiding clipping by setting the 
      win values to values greater than the yMax and abs(yMin).                 

     FAIL OS/2.usWinDescent value should be equal or greater                    
          than 700, but got 400 instead. [code: descent]                        

    Result: FAIL

 >> com.google.fonts/check/valid_glyphnames
    Glyph names are all valid?
    with ReemKufiInk-Regular.ttf

      Rationale:                                                                
      Microsoft's recommendations for OpenType Fonts states the following:      

      'NOTE: The PostScript glyph name must be no longer than 31 characters,    
      include only uppercase or lowercase English letters, European digits, the 
      period or the underscore, i.e. from the set [A-Za-z0-9_.] and should start
      with a letter, except the special glyph name ".notdef" which starts with a
      period.'                                                                  

      https://docs.microsoft.com/en-us/typography/opentype/spec/recom#post-table

      In practice, though, particularly in modern environments, glyph names can 
      be as long as 63 characters.                                              
      According to the "Adobe Glyph List Specification" available at:           

      https://github.com/adobe-type-tools/agl-specification                     

     FAIL The following glyph names do not comply with naming                   
          conventions: hamza-ar, highhamza-ar, alef-ar, alef-ar.1, alef-ar.2,   
          alef-ar.3, alef-ar.fina, alef-ar.fina.Lam, alef-ar.fina.Lam.1,        
          behDotless-ar and 388 more.                                           

          Use -F or --full-lists to disable shortening of long lists.           

          A glyph name must be entirely comprised of characters from the        
          following set: A-Z a-z 0-9 .(period) (underscore). A glyph name must  
          not start with a digit or period. There are a few exceptions such as  
          the special glyph ".notdef". The glyph names "twocents", "a1", and "" 
          are all valid, while "2cents" and ".twocents" are not. [code:         
          found-invalid-names]                                                  

    Result: FAIL
khaledhosny commented 2 years ago

while the Bold shows a semi-transparent (see joints) black outline

The bold is currently a placeholder, work on it hasn't been started yet.

m4rc1e commented 2 years ago

Hey Khaled,

Not trying to pressure you here but I'm wondering how you're progressing on the Bold?

I'm trying to establish the current status for all the color fonts since we were planning on having a big launch in June. Np if you need more time.

khaledhosny commented 2 years ago

I’m currently blocked on tooling issues:

  1. The color glyphs of the regular font were built using standalone SVG files, and while I can do the same for bold, it will make it pretty hard to do it in an interpolatable way. Do I want to migrate the SVGs to Glyphs’ color layers, but unfortunately they don't currently support all the SVG features I’m using.
  2. Even if I managed to work around this, font tools varLib does not currently support merging COLR table, so the variable font will have non-variable color gradients and will not be usable.
m4rc1e commented 2 years ago

Just a quick thought, would you be opposed to us just uploading the Regular for the time being?

khaledhosny commented 2 years ago

Regular only should be fine.

anthrotype commented 2 years ago

font tools varLib does not currently support merging COLR table, so the variable font will have non-variable color gradients and will not be usable.

I think this is no longer the case, since fonttools varLib now supports merging COLRv1 masters into a variable COLRv1 table

khaledhosny commented 2 years ago

font tools varLib does not currently support merging COLR table, so the variable font will have non-variable color gradients and will not be usable.

I think this is no longer the case, since fonttools varLib now supports merging COLRv1 masters into a variable COLRv1 table

Yes, I’m aware of this (and thanks for the work!). My current blocker is the lack of native COLRv1 support in Glyphs and the inability of the existing Color layers to support the way Reem Kufi Ink is using gradients. Doing a variable font using a standalone SVG files is going to be pain, and I’m trying to avoid this if I can help it.