Forum Discussion

TypeKitchen's avatar
TypeKitchen
Reel Rookie
10 months ago

Turn on custom font OpenType features

Is there a way to turn on custom font OpenType features? I'm looking for something equivalent to CSS font-feature-settings on web.

  • RokuBen's avatar
    RokuBen
    Community Moderator

    No, these aren't directly supported by the FreeType library that Roku OS uses for font rendering.

    • TypeKitchen's avatar
      TypeKitchen
      Reel Rookie

      Based on FreeType FAQ:

      ...the following features are not supported directly by the library, even though they can be more or less implemented on top of it, or by using it.

      Text layout: The library doesn't support text layout operations. Sophisticated features like glyph substitution, positioning (kerning), justification, bi-directional ordering, etc., are not part of a font service in itself. They must be handled (at least) one level higher.

      I understand that FreeType is meant to be a basic font service. Other abilities have to be implemented on top of that. Can you please confirm that Roku doesn't have any additional features built on top of FreeType to enable them at all?

      • RokuBen's avatar
        RokuBen
        Community Moderator

        We have started using the HarfBuzz library with Roku OS 13.0 to enable better text shaping, but we don't use any other libraries on top of FreeType at this time.