Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kerning issues #32

Closed
graphicore opened this issue Sep 16, 2015 · 12 comments
Closed

Kerning issues #32

graphicore opened this issue Sep 16, 2015 · 12 comments

Comments

@graphicore
Copy link
Collaborator

@Tarobish sent me some screenshots with glyph collisions/confluences and asked me to check out what's going on.

I'm posting the screenshots here and my own findings.

screen shot 2015-09-10 at 8 39 26 pm

That's taken from https://github.com/Tarobish/Jomhuria/blob/master/generated/documents/jaafari_jomhuria.pdf the second green row.

screen shot 2015-09-10 at 8 57 25 pm

It's allright here, without the marks.

@davelab6
Copy link
Contributor

GUESS: maybe your DFLT otl features are working but the AR ones are not...

@graphicore
Copy link
Collaborator Author

The collisions in the English case are now gone after adding lookupflag ignoreMarks; to the kerning lookups. I'm still trying to find a hint how to tackle the breaking lang="ar" case.

@graphicore
Copy link
Collaborator Author

@davelab6 I think you where right. I'm just wondering, I thought the languages would fallback to language dflt if I don't specify them explicitly, so I did the following. Thinking that script arab; would activate the lookups for all languages of that script.

feature kern {
    script latn;
    lookup kernMixedLTR;
    script arab;
    lookup kernPureRTL;
    lookup kernMixedRTL;
} kern;

But I was wrong, the language dflt is, as it seems, a fallback for all languages with that script, that I don't register in the font. I think this is quite annoying.

What I do now is the following, for all languages that we define in the features and it works. I wonder if there is a shortcut, however.

feature kern {
    script latn;
    language dflt;
    lookup kernMixedLTR;
    language TRK ;
    lookup kernMixedLTR;
    script arab;
    language dflt;
    lookup kernPureRTL;
    lookup kernMixedRTL;
    language ARA ;
    lookup kernPureRTL;
    lookup kernMixedRTL;
    language URD ;
    lookup kernPureRTL;
    lookup kernMixedRTL;
    language SND ;
    lookup kernPureRTL;
    lookup kernMixedRTL;
} kern;

@graphicore
Copy link
Collaborator Author

selection_004

@Tarobish
Copy link
Owner

Awesome :)

On Sep 21, 2015, at 1:36 PM, Lasse Fister [email protected] wrote:

https://cloud.githubusercontent.com/assets/393132/10004273/291c707e-60b1-11e5-8948-4199de0cdbdb.png

Reply to this email directly or view it on GitHub #32 (comment).

@graphicore
Copy link
Collaborator Author

I'll commit this in a second.

@khaledhosny
Copy link
Contributor

You should just have the language system declarations on top of your file:

languagesystem DFLT dflt;
languagesystem arab dflt;
languagesystem arab TRK;
etc…

And yes, if any language is explicitly specified anywhere else in the font, it needs to be explicitly specified where ever it should be applied, otherwise it will be ignored where it is not specified.

@graphicore
Copy link
Collaborator Author

they are there, same as in Amiri, I think:

languagesystem DFLT dflt;
languagesystem arab dflt;
languagesystem arab ARA;
languagesystem arab URD;
languagesystem arab SND;
languagesystem latn dflt;
languagesystem latn TRK;

@khaledhosny
Copy link
Contributor

Yes, but you already had script latn; and script arab; inside the feature block, which override the globals. You can just get rid of them and register all kerning for all scripts, it shouldn’t harm unless you have conflicting kerning pairs (it can possibly make the layout slower, but I doubt it will be anything measurable, but you can test this of course).

@graphicore
Copy link
Collaborator Author

unless you have conflicting kerning pairs

That's exactly what I have after implementing unified-font-object/ufo-spec#16 (comment)

@davelab6
Copy link
Contributor

I think this is quite annoying.

LOL welcome to opentype. Please add something about this to http://meta.wikimedia.org/wiki/Future_Global_Font_Format_Requirements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants