Fontlab - Changing diacritics' case

Primary tabs

28 posts / 0 new
Last post
Fábio Duarte Martins's picture
Joined: 23 Nov 2005 - 10:27am
Fontlab - Changing diacritics' case
0

Well, this is probably a easy one:

When working in FreeFont mode, how can I assign automatically a lower-case acute mark to a lower-case glyph and a upper-case mark to a upper-case glyph?

Fontlab insists on giving lower-case marks to all characters.

Thank you in advance.

André Simard's picture
Offline
Joined: 25 Nov 2004 - 12:11pm
0

Good question. This will also be helpful to me.

j's picture
j
Offline
Joined: 30 Jul 2004 - 1:49pm
0

Check out Ben Kiel's BuildAccent python library. Once you set up the build file it's easy. http://benkiel.com/typeDesign/

Matthew Stephen Stuckwisch's picture
Joined: 7 Feb 2007 - 10:21am
0

Question from non-user: If you have acutecomb and acutecomb.cap, for instance, in your case substitution, does it not automatically replace it when needed? FontForge does it for me...

«El futuro es una línea tan fina que apenas nos damos cuenta de pintarla nosotros mismos». (La Luz Oscura, por Javier Guerrero)

James Montalbano's picture
Joined: 18 Jun 2003 - 11:00am
0

If you name your uppercase accents with a .case suffix FontLab will use most of them. You can customize all of this by editing the alias.dat file. You can go as far as using small cap accents named with a .smcp suffix and most of them will work as well. Watch out for those caron.case and caron.smcp uses. You really have to edit alias.dat for those to work.

Fábio Duarte Martins's picture
Joined: 23 Nov 2005 - 10:27am
0

OK, thank you guys!

terminaldesign, can you provide me an explanation on how to do this?

Cheers!

James Montalbano's picture
Joined: 18 Jun 2003 - 11:00am
0

It is a text edit procedure. Here are the first few lines of the alias.dat file:

%%FONTLAB ALIASES
% Build 2005-09-05 for FontLab Studio 5.0 or higher
AE A_E
AEacute AE+~acute.case
AEacute AE+acutecomb
AEacute AE+acute
AEacute.small AE.small+~acute.small
Aacute A+~acute.case
Aacute A+acutecomb
Aacute A+acute
Aacute.small A.small+~acute.small
Abreve A+~breve.case
Abreve A+uni0306
Abreve A+breve
Abreve.small A.small+~breve.small
Acircumflex A+~circumflex.case
Acircumflex A+uni0302
Acircumflex A+circumflex
Acircumflex.small A.small+~circumflex.small
Adieresis A+~dieresis.case
Adieresis A+uni0308
Adieresis A+dieresis
Adieresis.small A.small+~dieresis.small
Agrave A+~grave.case
Agrave A+gravecomb
Agrave A+grave

As you can see there are several formulas for constructing the composite glyph. If the components are available for the first formula, it will be used. If not the the second formula will be tried, and finally the third.

You can edit these, so if you don't use .case, but use .cap instead, do a find and replace and change it.

Just make sure you have a backup of the original in case you screw it up.

Ben Mitchell's picture
Offline
Joined: 12 Aug 2007 - 4:05pm
0

Useful info, thanks :)

Fábio Duarte Martins's picture
Joined: 23 Nov 2005 - 10:27am
0

Thanks terminaldesign, it worked and helped a lot!

:)

Jos Buivenga's picture
Offline
Joined: 19 Nov 2005 - 5:11pm
0

Thanks, James! Works great.

Maybe also (a tiny little) useful... to batch change suffixes:

Fábio Duarte Martins's picture
Joined: 23 Nov 2005 - 10:27am
0

Hey Jos!

That's soooo handy!

Jos Buivenga's picture
Offline
Joined: 19 Nov 2005 - 5:11pm
0

Thanks. I really took me some time to find out where this command resided.

Eben Sorkin's picture
Offline
Joined: 22 Jan 2004 - 4:19pm
0

James, thanks for this!!!

Craig Eliason's picture
Offline
Joined: 19 Mar 2004 - 1:44pm
0

What's that tilde before some of the components in the alias.dat file?

James Montalbano's picture
Joined: 18 Jun 2003 - 11:00am
0

The tilde before the component is an instruction not to reposition the component. One assumes that the .case or .small accents are designed at the appropriate height to correctly position over the glyphs. If you left the tilde out FontLab would raise the position of the accent assuming it was originally positioned for the lowercase.

James Montalbano's picture
Joined: 18 Jun 2003 - 11:00am
0
Craig Eliason's picture
Offline
Joined: 19 Mar 2004 - 1:44pm
0

I see - thanks!

Jan Schmoeger's picture
Offline
Joined: 12 Dec 2008 - 5:39am
0

Thanks, [track].

Jan Willem Wennekes's picture
Joined: 11 Aug 2011 - 8:55am
0

Awesome, I keep on learning new tricks!

Can't seem to find that alias.dat file anywhere though? Am on a windows vista machine...

Ben Mitchell's picture
Offline
Joined: 12 Aug 2007 - 4:05pm
0

Try Program Files/Common Files/Fontlab/Data.

Jan Willem Wennekes's picture
Joined: 11 Aug 2011 - 8:55am
0

Yes, that's it! Awesome, thanks Ben!

Martin Silvertant's picture
Joined: 31 Dec 2009 - 11:51pm
0

Can someone explain what the alias.dat file does exactly? I mean, is it safe to replace the file once you're almost done with your font or should this be done at the beginning of the design process?

Just make sure you have a backup of the original in case you screw it up.

What can potentially go wrong?

Frode Bo Helland's picture
Joined: 26 Feb 2007 - 1:03pm
0

alias.dat has no effect on the font file. You can modify it to change the automated building of composite glyphs, like for example doubleclicking the æ adds composites of a & e.

Martin Silvertant's picture
Joined: 31 Dec 2009 - 11:51pm
0

I had a look at the file and I'm puzzled as to what I actually need to change for cap diacritics, or is it just a matter of being consistent with the suffixes? Is there a preference between .case and .cap?

Martin Silvertant's picture
Joined: 31 Dec 2009 - 11:51pm
0

I'm trying to make the L-caron but can't get it to work. First off, since the caron in L-caron looks like a comma, I created a glyph called 'caroncomma'. I doubt this is how it's supposed to be done, so what's the correct way?

I used caroncomma to generate l-caron and it works as I would expect. For L-caron I created a second caroncomma and tried the names caroncomma.cap, caroncomma.case and caroncommacap but in all cases the caron is placed too high in L-caron. So what do I change in alias.dat to fix this? Also, won't I run into problems when opening the font on a computer which has the unmodified alias.dat?

Frode Bo Helland's picture
Joined: 26 Feb 2007 - 1:03pm
0

Aacute A+~acute.case
aacute a+~acute

From the FontLab forum:
“You'll find it in the "Creating Composites and Ligatures" section in the manual:

In the composition recipe, the "+" command may be followed by one or
two alignment commands:
^ align component to the uppercase position
~ do not move component vertically
< align component to the left of the base glyph
> align component to the right of the base glyph
| center component horizontally

[...]

Use "%=" instead of "=" to decompose created composite glyph. For
example:
A+^ring%=Aringdecomposed”

You won’t run into problems when opening the font on another computer.

Martin Silvertant's picture
Joined: 31 Dec 2009 - 11:51pm
0

Ohh these are codes to be used for the Generate Glyphs command. For some reason I missed that. Thanks for elaborating.

Two question which went unanswered: is it better to use .case, .cap or doesn't it matter as long as you're consistent? What's the appropriate name of the caron that looks like a comma?

Thomas Phinney's picture
Offline
Joined: 3 Sep 2002 - 11:00am
0

alias.dat is used for generate glyphs, and also when you double-click on an empty slot in the font window.

.cap or .case doesn’t matter as long as there is the matching data in alias.dat. On a technical level, you could even use some of each, but that would probably get confusing!

I’d name it the alternate caron... caron + some extension. Could be caron.commalike or caron.alt.