Typophile

Generating a correct-named .ttf font

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).

AttachmentSize
Skærmbillede 2011-01-13 kl. 16.22.12.png81.88 KB

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?

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

Start drawing.

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()

@ 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.

Captured from commoncrawl.org on 25 Apr 2015. original URL