Comments (8)
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.
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.
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.
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.
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.
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.
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.
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)
- Nested lookups problem with mark to base positioning cannot get previous base glyph.
- Vulkan renderer flickering quad
- Rendering doesn't work properly
- Double Kasra character with Omar Naskh font
- segfault during hz_font_data_load with microsoft supplied arial.ttf HOT 4
- OS/Arch compilation status HOT 1
- Bug with omar-type fonts Arabic shaping, joining is inconsistent with YEH, BEH and JIM. HOT 1
- Mark-to-base attachments sometimes don't work with omar-type fonts. HOT 1
- glyphs duplicating in Omar Naskh font with 'calt' feature
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hamza.