r.init not showing at the beginning of a line

Get help with FontCreator here. Please do not post feature requests or bug reports here.
Post Reply
emilysp
Posts: 2
Joined: Wed Jan 08, 2020 6:09 pm

r.init not showing at the beginning of a line

Post by emilysp » Wed Jan 08, 2020 6:16 pm

I have programmed "r.init" to be a contextual alternate to come after a space. But at the beginning of a line, the "r.init" is not replacing the regular "r". Please see the sample font and the other attachment for reference. How do I fix this?
Attachments
initial r not working.jpg
initial r not working.jpg (324.78 KiB) Viewed 860 times
TEST FONT R Initial.otf
(8.39 KiB) Downloaded 23 times

MikeW
Posts: 612
Joined: Mon May 20, 2013 2:51 pm

Re: r.init not showing at the beginning of a line

Post by MikeW » Wed Jan 08, 2020 6:34 pm

In what circumstances do you desire the r.init to not appear? I.e., when do you want what is now the /r character to be used?

Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 8511
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: r.init not showing at the beginning of a line

Post by Bhikkhu Pesala » Wed Jan 08, 2020 7:00 pm

Mike, I think the idea is to use r.init after a newline code as well as after a space.
My FontsReviews: MainTypeFont CreatorHelpFC12 Pro + MT9.0 @ Win10 1909 build 18363.720

MikeW
Posts: 612
Joined: Mon May 20, 2013 2:51 pm

Re: r.init not showing at the beginning of a line

Post by MikeW » Wed Jan 08, 2020 7:24 pm

Bhikkhu Pesala wrote:
Wed Jan 08, 2020 7:00 pm
Mike, I think the idea is to use r.init after a newline code as well as after a space.
Maybe. But that's why I asked the question, when to use the present /r?

Seems to me that the r.init should be in the /r slot and that the current /r glyph should be what is substituted under X circumstance(s).

Erwin Denissen
Moderator
Moderator
Posts: 8507
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: r.init not showing at the beginning of a line

Post by Erwin Denissen » Wed Jan 08, 2020 7:28 pm

emilysp wrote:
Wed Jan 08, 2020 6:16 pm
I have programmed "r.init" to be a contextual alternate to come after a space. But at the beginning of a line, the "r.init" is not replacing the regular "r". Please see the sample font and the other attachment for reference. How do I fix this?
This forum topic might help:
How to make a contextual cursive font

Especially this script might solve your problem:

Code: Select all

script latn {
  feature ContextualAlternates;
}

class @hightail [b o q v w b.high o.high q.high v.high w.high b.init o.init q.init v.init w.init];
class @lowercase [a b c d e f g h i j k l m n o p q r s t u v w x y z];
class @lowercasehigh [a.high b.high c.high d.high e.high f.high g.high h.high i.high j.high k.high l.high m.high n.high o.high p.high q.high r.high s.high t.high u.high v.high w.high x.high y.high z.high];
class @lowercaseinit [a.init b.init c.init d.init e.init f.init g.init h.init i.init j.init k.init l.init m.init n.init o.init p.init q.init r.init s.init t.init u.init v.init w.init x.init y.init z.init];
class @lowercasefina [a.fina b.fina c.fina d.fina e.fina f.fina g.fina h.fina i.fina j.fina k.fina l.fina m.fina n.fina o.fina p.fina q.fina r.fina s.fina t.fina u.fina v.fina w.fina x.fina y.fina z.fina];
class @lowercase_all [A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z a.high b.high c.high d.high e.high f.high g.high h.high i.high j.high k.high l.high m.high n.high o.high p.high q.high r.high s.high t.high u.high v.high w.high x.high y.high z.high a.init b.init c.init d.init e.init f.init g.init h.init i.init j.init k.init l.init m.init n.init o.init p.init q.init r.init s.init t.init u.init v.init w.init x.init y.init z.init a.fina b.fina c.fina d.fina e.fina f.fina g.fina h.fina i.fina j.fina k.fina l.fina m.fina n.fina o.fina p.fina q.fina r.fina s.fina t.fina u.fina v.fina w.fina x.fina y.fina z.fina];

feature ContextualAlternates calt {
  lookup ChainingContextInit;
  lookup ChainingContextFina;
  lookup ChainingContextBetween;
  lookup ChainingContextHighTail;
}

lookup ChainingContextBetween {
  context (@lowercase_all) @lowercaseinit (@lowercase_all);
  sub 0 SingleSubstitutionInitToNormal;
}

lookup ChainingContextFina {
  context (@lowercase_all) @lowercase;
  sub 0 SingleSubstitutionFina;
}

lookup ChainingContextHighTail {
  context (@hightail) @lowercase;
  sub 0 SingleSubstitutionHighTail;
}

lookup ChainingContextInit {
  context @lowercase (@lowercase);
  sub 0 SingleSubstitutionInit;
}

lookup SingleSubstitutionFina {
  sub @lowercase -> @lowercasefina;
}

lookup SingleSubstitutionHighTail {
  sub @lowercase -> @lowercasehigh;
}

lookup SingleSubstitutionInit {
  sub @lowercase -> @lowercaseinit;
}

lookup SingleSubstitutionInitToNormal {
  sub @lowercaseinit -> @lowercase;
}
Bhikkhu Pesala wrote:
Wed Jan 08, 2020 7:00 pm
Mike, I think the idea is to use r.init after a newline code as well as after a space.
Each line starts as a new glyph run, so you can't add a newline within feature code.
Erwin Denissen
High-Logic
Proven Font Technology

MikeW
Posts: 612
Joined: Mon May 20, 2013 2:51 pm

Re: r.init not showing at the beginning of a line

Post by MikeW » Wed Jan 08, 2020 7:53 pm

This may also resolve the issue...if we knew what it was.
Attachments
TEST FONT R Initial.fcp
(10.93 KiB) Downloaded 21 times

emilysp
Posts: 2
Joined: Wed Jan 08, 2020 6:09 pm

Re: r.init not showing at the beginning of a line

Post by emilysp » Fri Jan 10, 2020 6:05 pm

the /r is designed like that so that the letters coming before it can attach seamlessly. So yes, I would like the r.init to be the replacement in situations where there is a space or a new line before the r.

MikeW
Posts: 612
Joined: Mon May 20, 2013 2:51 pm

Re: r.init not showing at the beginning of a line

Post by MikeW » Fri Jan 10, 2020 6:51 pm

Which, with them swapped around, is what the version I uploaded does. Just need to add appropriate letters into the class for when /r (the swapped around version) it is preceded by the class letter.

Capture_000383.png
Capture_000383.png (4.51 KiB) Viewed 794 times

Post Reply