Glyph Substitution

Get help with FontCreator here. Please do not post feature requests or bug reports here.
Post Reply
dougw4
Posts: 3
Joined: Thu May 08, 2014 2:24 am

Glyph Substitution

Post by dougw4 »

I am a Newbie. I am trying to teach myself how to do glyph substitution. Nothing I try works. So I made a simple test font. The font contains two glyphs: an "a" and a "b". I'm trying to write a custom script that will substitute a "b" every time I type an "a". My custom script is below. Can anyone tell me what I'm doing wrong? Thanks very much!

script latn {
# Latin
feature GlyphCompositionDecomposition;
}

feature GlyphCompositionDecomposition ccmp {
# Glyph Composition / Decomposition
lookup Lookup1;
}

lookup Lookup1 {
# Referenced by feature "GlyphCompositionDecomposition"
sub a -> b;
}
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9878
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Glyph Substitution

Post by Bhikkhu Pesala »

There's a lot to learn, so if we know your final aim we can direct you to the best place to start. I am self-taught, not an expert on OpenType features, so I had to learn by trial and error.

The simplest one to one substitutions used by Stylistic Alternates or Scientific Inferiors might be a good place to start, rather then glyph decomposition.

Which program are you using to test the font?
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
William
Top Typographer
Top Typographer
Posts: 2038
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: Glyph Substitution

Post by William »

Welcome to the forum.

I have just made a test font using your script and tried it in Serif PagePlus X6.

It works correctly.

So now we need to find out why you are not achieving the same result.

Did you set the Export settings to Custom Script?

In whatever application you are testing the font, did you turn the ccmp table on, so that the application uses the ccmp table?

If either of the above questions are not understood, please say and I can go into detail.

William Overington

8 May 2014
León Fridsma
Posts: 694
Joined: Mon Dec 07, 2009 10:26 am
Location: De Bilt, Netherlands
Contact:

Re: Glyph Substitution

Post by León Fridsma »

Not all applications support opentype features, or they may not be enabled by default. If you want to test your script, I recommend testing it in your webbrowser as a webfont. Simply press CTRL+F5 from within fontcreator to create a demo page to view and test your features.
William
Top Typographer
Top Typographer
Posts: 2038
Joined: Tue Sep 14, 2004 6:41 pm
Location: Worcestershire, England
Contact:

Re: Glyph Substitution

Post by William »

León Fridsma wrote:Not all applications support opentype features, or they may not be enabled by default. If you want to test your script, I recommend testing it in your webbrowser as a webfont. Simply press CTRL+F5 from within fontcreator to create a demo page to view and test your features.
I just tried that and it works well with the test font that I made.

One point: I usually use the screen at 800 pixels by 600 pixels and I needed to resize the screen resolution to 1024 by 768 to get everything on the screen at the left.

That was no problem, I am not complaining.

I am just mentioning it in case anyone else is using the screen usually at 800 pixels by 600 pixels.

William
dougw4
Posts: 3
Joined: Thu May 08, 2014 2:24 am

Re: Glyph Substitution

Post by dougw4 »

Thanks for your suggestions! It seems like my problem all along has been that I'm using MS Word 2007 as my font client. When I tried the CTRL-F5 technique my font worked!

I have just made a test font using your script and tried it in Serif PagePlus X6. It works correctly.

Thanks William! I've got it working now.
dougw4
Posts: 3
Joined: Thu May 08, 2014 2:24 am

Re: Glyph Substitution

Post by dougw4 »

León Fridsma wrote:Not all applications support opentype features, or they may not be enabled by default. If you want to test your script, I recommend testing it in your webbrowser as a webfont. Simply press CTRL+F5 from within fontcreator to create a demo page to view and test your features.
This worked for me. Thanks very much!
Post Reply