Generating a correct-named .ttf font

Primary tabs

6 posts / 0 new
Last post
Morten Rostgaard Olsen's picture
Joined: 19 Nov 2003 - 5:42am
Generating a correct-named .ttf font
0

Dear All,

I have a little problem here ...I have never generate a .ttf file before, so how do I name this font-file correctly in the Font-info
in Fontlab?
Thanks for your kind help! (Attach a screenshot with a test-font called Morten Pro).

Blank's picture
Offline
Joined: 25 Sep 2006 - 2:15pm
0
Morten Rostgaard Olsen's picture
Joined: 19 Nov 2003 - 5:42am
0

Thanks!
Well, Adam Twardoch has never been able to explain anything in a clear and simple way ;-) So difficult!
There must be a very easy way to show this - why not use pictures to explain this instead of words?

Blank's picture
Offline
Joined: 25 Sep 2006 - 2:15pm
0

…why not use pictures to explain this instead of words?

Start drawing.

Rachel Roberts's picture
Offline
Joined: 21 Feb 2007 - 12:23pm
0

No pictures sorry but I wrote this macro that will fill in all the relevant fields to name the font. Run the macro and you will get two dialog boxes, one for the font name and one for the font weight.


from robofab.world import CurrentFont
from robofab.interface.all.dialogs import AskString
f = CurrentFont()
#
fontName = AskString('Font Name')
Weight = AskString('Weight')
#
def naming( short, weight, weight2 ):
f.info.familyName = fontName+" "+short
f.info.widthName = "Normal"
f.info.styleName = weight
f.info.fontName = fontName.replace(' ', '')+"-"+weight2.replace(' ', '')
f.info.fullName = fontName+" "+weight2
f.info.menuName = fontName+" "+short
f.info.fondName = fontName.replace(' ', '')+" "+weight2.replace(' ', '')
f.info.otFamilyName = fontName
f.info.otStyleName = weight2
#
#
if Weight == "Thin":
naming("Th", "Regular", "Thin")
f.info.weightName = "Thin"
f.info.weightValue = 250
print f.info.fullName+" "+"Named"
elif Weight == "Light":
naming("Lt", "Regular", "Light")
f.info.weightName = "Light"
f.info.weightValue = 300
print f.info.fullName+" "+"Named"
elif Weight == "Regular":
naming("Rg", "Regular", "Regular")
f.info.weightName = "Regular"
f.info.weightValue = 400
print f.info.fullName+" "+"Named"
elif Weight == "Medium":
naming("Lt", "Bold", "Medium")
f.info.weightName = "Medium"
f.info.weightValue = 500
print f.info.fullName+" "+"Named"
elif Weight == "Bold":
naming("Rg", "Bold" ,"Bold")
f.info.weightName = "Bold"
f.info.weightValue = 700
print f.info.fullName+" "+"Named"
elif Weight == "Thin Italic":
naming("Th", "Italic", "Thin Italic")
f.info.weightName = "Thin"
f.info.weightValue = 250
print f.info.fullName+" "+"Named"
elif Weight == "Light Italic":
naming("Lt", "Italic", "Light Italic")
f.info.weightName = "Light"
f.info.weightValue = 300
print f.info.fullName+" "+"Named"
elif Weight == "Italic":
naming("Rg", "Italic", "Italic")
f.info.weightName = "Regular"
f.info.weightValue = 400
print f.info.fullName+" "+"Named"
elif Weight == "Medium Italic":
naming("Lt", "Bold Italic", "Medium Italic")
f.info.weightName = "Medium"
f.info.weightValue = 500
print f.info.fullName+" "+"Named"
elif Weight == "Bold Italic":
naming("Rg", "Bold Italic", "Bold Italic")
f.info.weightName = "Bold"
f.info.weightValue = 700
print f.info.fullName+" "+"Named"
else:
print "Ooops that's not a weight"
print fontName+" "+"is not named"
#
f.update()

Arno Enslin's picture
Offline
Joined: 30 Jun 2009 - 3:48am
0

@ Morten

Well, Adam Twardoch has never been able to explain anything in a clear and simple way ;-) So difficult!
There must be a very easy way to show this - why not use pictures to explain this instead of words?

I think the thread on the FontLab forum answers almost all questions with regard to the naming. I don’t think, that it can be explained in a much simpler way. With the next version of FontLab Studio it probably will be easier. But even then it may be, that you want to improve anything by decompiling and editing the name table.