Comments (5)
See IBM/plex#407
from fonts.
@yanone could you take a look?
from fonts.
This is a problem that exists with many Arabic fonts, even my own (work-in-progress).
These fonts have a ligature for الله which already includes tashkeel in its presentation which are not typed, so a user just types ا ل ل ه
and it turns into the ligature including tashkeel. This الله that I typed here should probably also contain tashkeel.
That's of course problematic. In the issue above, the typed text itself contains tashkeel, which are then applied on top of the ligature that already contains tashkeel.
The easiest solution would be to remove the composed ligature from the font, requiring users to explicitly apply tashkeel. But this has not been the common practice in font-making. The common practice until now has been to type plain ا ل ل ه
and receive a ligated الله incl. tashkeel.
Another solution is to correctly apply OpenType feature code.
In my own font (just now for testing) I've been able to eliminate the tashkeel collisions by removing the IgnoreMarks
modifier for the allah-ar
character, so the code looks like this:
lookup rlig_arab_1 {
# Arabic
script arab;
# Default
language dflt;
lookupflag RightToLeft;
sub alef-ar lam-ar.init lam-ar.medi heh-ar.fina by allah-ar;
} rlig_arab_1;
Which means that, as soon as marks are involved, the ligature will not be substitued. The results speaks for itself:
Before we move on to fix the issue in any of the fonts, I would like to proceed with defining a Fontbakery check for this.
I would make this check into a shaping check, counting the amount of glyphs after shaping.
For example: If the sequence ا ل ل ه turns into a single glyph, then also measure what ا ل ل ه ُ turns into. If it's two glyphs (ligature + tashkeel), the OpenType code ignores marks which should turn into a FAIL.
@khaledhosny @simoncozens, what are your thoughts on this?
from fonts.
My thoughts are (a) it's a good candidate for a shaperglot check, and (b) https://www.unicode.org/notes/tn46/tn46-1.pdf
from fonts.
@simoncozens Is such a check implementable using the current set of shaperglot instructions? If so, how would you implement it?
Khaled's idea in the linked thread of offering two ligatures is valid (tho Bold Monday's implementation of putting all marks on the second ل is surely wrong), as is offering just one ligature and ignoring it as soon as marks are present.
At least I don't see how this can be solved using a static shaperglot test definition.
Because you would have to compare the output buffers of ا+ل+ل+ه against ا+ل+ل+ه+ُ (for example), but check that just the base ا+ل+ل+ه differs. You need to compare two sequences that don't have the same input string, and so they are going to be different in any case.
I think this would be a dynamic check written in code. Then of course it makes no difference whether it's in FB or shaperglot, with the latter being the better host.
from fonts.
Related Issues (20)
- Add Iansui HOT 1
- Add Dorothy Matrix M
- ufo file of CJK font is too large HOT 1
- Add German umlauts to Gugi HOT 1
- Deduplicate lookups in Crimson Text HOT 4
- Rene Bieder - Campton HOT 4
- Lato font - Missing Czech characters and additional weights HOT 4
- Impossible to use "Noto [Sans/Serif] [SC/TC/JP/KR]" fonts in Google Chrome/MSEdge HOT 1
- Roboto Flex character "Ī" is broken
- Request to update Unna
- Rquest to alter line spacing and size in Noto Nastaliq Urdu HOT 1
- Request for italic version of Quicksand HOT 4
- Add Badeen Display HOT 2
- Roboto is still missing the german capital ẞ (Eszett) character
- Update Big Shoulders families with `opsz` axis
- Add Bungee "Color" HOT 1
- Ga Maamli: Add Designers and assets
- Add designer Laura Garcia Mut
- Request for more style options for Bellefair
- Add [Font Name]
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 fonts.