- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 23.5k
 
          Use HarfBuzz to fix variant hinting in TextServerAdvanced
          #111461
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
d960c6a    to
    1c4e6bb      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we do include HarfBuzz there's no reason not to enable it.
Not sure if there's any point for making it a separate module, TextServerFallback should not be able to use any OT features, so it should not do anything.
          
 Note that you can enable character variants within the font file itself, and they should show up even when using  
 Edit: It seems like freezing font features bypasses the need for HarfBuzz. Still a good thing to implement as it "fixes" custom font feature usage.  | 
    
| 
           Shouldn't this be labelled as a bug? Because technically: 
 Technically, the end user having to resort to font feature freeze would be considered a workaround for this.  | 
    
TextServerAdvanced
      TextServerAdvancedTextServerAdvanced
      | 
           Thanks!  | 
    
Fixes font hinting for custom enabled character variations in
TextServerAdvanced.Before (uppercase i is a character variant from Inter):

After:

Does not affect character variations if enabled through the font file with font feature freeze, as they should be working properly by default. And doesn't matter in
TextServerFallbackas it doesn't support using font variations without font feature freeze anyway.This is done by simply activating a define in FreeType and exposing HarfBuzz to it in the build scripts. FreeType's source code has the following comments regarding this:
If accepted, this would allow #111140 to enable more variants without having to resort to font feature freezes.
I found this by compiling the engine with
builtin_freetype=noand noticing the hinting fixed, as Arch Linux's FreeType is linked with HarfBuzz.