How to convert TTF to FNT with Fontforge

為{幸葍}努か 提交于 2020-01-10 18:56:08

问题


I have a TTF font, that needs to be converted in FNT (and ideally in pcf too). I tried Fontforge, but when I loaded font and chose to generate font - nothing could be selected from the list on the right, except "No bitmap fonts" though there was WIN FNT. Can anyone help me with this?


回答1:


FNT is a bitmap format while TTF is an outline/vector format. To get FNT output, you'll first need to create a bitmap strike or strikes. Fontforge can do this if it has been built with Freetype included:

  • Go to Element -> Bitmap Strikes Available.
  • Select the 'Win' button
  • Under 'Point Sizes' enter the size (or sizes) you want.
  • Tick 'Use FreeType' and 'Create Rasterized Strikes' Click OK.

You should now have a bitmap strike to work with. Go to Generate Fonts; on the left side select 'No Outline Font', and on the right side select Windows FNT, pick the size you want, and generate.




回答2:


I recommend trying Hiero. It can convert any installed system font or font file into .fnt.

You can download it from BadLogicGames.

  • Open runnable-hiero.jar
  • Select the font you want to convert.
    • For installed fonts on your PC: Select System
    • For downloaded font files: Select File and choose a font by clicking ...
  • In the menubar, select File → Save BMFont files (text)
  • Choose a save location and filename ending in .fnt

If done correctly, you should have two files for font_name.fnt and font_name.png



来源:https://stackoverflow.com/questions/24529369/how-to-convert-ttf-to-fnt-with-fontforge

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!