Custom fonts in Tilemill

المشرف العام

Administrator
طاقم الإدارة
I'm trying to add a custom font to my OSM Bright project in TileMill. I've followed instructions here: Tilemill use custom font and have found where in the palette.mss file I need to add my font, I've also add the .ttf to the \fonts directory in my project.

There are a few lines after each of the other fonts that the project already uses and I can't figure out what I need to put here. For example, these are two of the existing fonts being used:

@sans_bold: "Open Sans Bold","DejaVu Sans Bold","unifont Medium";@sans_bold_italic: "Open Sans Bold Italic","DejaVu Sans Bold Italic","unifont Medium";I have tried adding a font called 'Blackout-2am' [which is the name listed when I click the 'A' in the bottom left corner of the TileMill window:

@blackout: "Blackout-2am","Blackout-2am","unifont Medium";I then added the '@blackout' to the labels.mss under 'Country names' for my map but when I try and save the .mss the code though the font doesn't render as it should.

I'm assuming it's something to do with this, but not quite sure what to change, or whether for example i should have "unifont medium" in the code?

Does anyone have any ideas on what needs to go after the name of the font I wish to use??

Thanks for any help given!



أكثر...
 
أعلى