Giter Site home page Giter Site logo

Comments (5)

behdad avatar behdad commented on May 28, 2024

Technically synthesized GDEF is part of OpenType requirements.

from harfbuzz.

behdad avatar behdad commented on May 28, 2024

In particular, in this page:

http://www.microsoft.com/typography/otspec/GDEF.htm

There's this text:

"""If the font does not include a GlyphClassDef table, the client must define and maintain this information when using the GSUB and GPOS tables."""

from harfbuzz.

twardoch avatar twardoch commented on May 28, 2024

Good point. I'd leave it in, then. The other issues bother me more. For testing purposes, synth GDEF can be worked around very easily (by supplying an empty GlyphClassDef). The other behaviors are a bit more tricky to catch, and thus more misleading. Also, I guess they're the ones where HarfBuzz does "more" than other engines do.

from harfbuzz.

behdad avatar behdad commented on May 28, 2024

Ok lets see what you can do without HarfBuzz as is:

Normalization can be fully disabled if you use hb_unicode_funcs_create(hb_unicode_funcs_get_default) and then set compose(), decompose(), and decompose_compatibility() callbacks that do nothing (return false / 0).

Fallback positioning can be disabled if you similarly use a font_funcs implementation that returns false for get_glyph_extents(). Also see hb_font_create_sub_font(). You don't need to modify your existing font_funcs, you can provide an overlay that disables get_glyph_extents(), similar to the unicode_funcs approach.

The fallback Thai shaping (ie. the shape-to-PUA) is automatically disabled if the font has a GSUB script for Thai.

The fallback Arabic shaping is automatically disabled if the font has at least one of init/medi/fini/isol.

I think I still want to implement a pure mode in the API, but this should unblock anyone needing that today.

from harfbuzz.

behdad avatar behdad commented on May 28, 2024

So talking to Jonathan, we think we want to allow disabling these:

  • Fallback Arabic shaping,
  • fallback Thai shaping,
  • fallback positioning

on the grounds that these are neither part of OpenType, nor Unicode. I'm leaning towards disabling them all together, with no fine-grained control.

from harfbuzz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.