Giter Club home page Giter Club logo

Comments (8)

saidwho12 avatar saidwho12 commented on August 27, 2024 1

After some research I found out that this is simply an issue of Unicode Normalization. It's supposed to work without even specifying any typographical features. I'm gonna be working on a fix right now.

from hamza.

kaiserschmarrn0 avatar kaiserschmarrn0 commented on August 27, 2024

very cool. can you explain a bit more? what about normalization is needed for this to work? after reading about it, i'm not quite sure.

from hamza.

saidwho12 avatar saidwho12 commented on August 27, 2024

Yeah so Unicode Normalization takes care of combining characters and also takes care of just cleaning up a Unicode string you can read more on it here: https://www.unicode.org/reports/tr15/

So say I have a string of Arabic with some characters in MEDIAL form and others in FINAL and others as ISOLATED or just Normalized form, the function would turn everything into normalized form.

from hamza.

saidwho12 avatar saidwho12 commented on August 27, 2024

In normalization if you have a latin alphabet character followed by a combining mark, it will combine them into a new unicode character. It also has to validate that the combining marks are valid. OpenType tables on the other hand work on glyphs and doesn't know anything about unicode characters, it's used to implement more complex font features like ligatures, kerning, cursive scripts, stylistic alternates, etc.

from hamza.

kaiserschmarrn0 avatar kaiserschmarrn0 commented on August 27, 2024

It seems so, but not all valid graphemes that use combining characters can be composed into a single codepoint. Is there something about normalization enforcing ordering that is the missing piece?

from hamza.

kaiserschmarrn0 avatar kaiserschmarrn0 commented on August 27, 2024

if you have discord and you're ok with adding me, i can also message you there since github is inconvenient. superdivider#2041

from hamza.

kaiserschmarrn0 avatar kaiserschmarrn0 commented on August 27, 2024

im also confused about the api. why in the stbtt_example do you iterate through the glyph metrics and keep track of pen_x manually? how is this supposed to work with decomposed glyphs? i would expect to get extents and a list of positions / glyph identifiers / dimensions, since not all glyphs are just put at the end of the ltr layout.

from hamza.

saidwho12 avatar saidwho12 commented on August 27, 2024

This is how every library does it and what do you mean with "this doesn't work with decomposed glyphs" ? If you mean mark placement then this works because marks don't advance, and x_offset and y_offset take care of positioning .

from hamza.

Related Issues (10)

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.