Closed edwinfinch closed 2 years ago
SnowB Use this instead ! Thank me later ;)
Hi @edwinfinch, I just tried to reproduce the problem, here is a picture to compare the glyphs (font size == 88):
Looks pretty the same (considering different rendering engines: WinGDI and Freetype2).
Command line for fontbm:
%fontbm% --font-file %font_file% --output %output% --background-color 0,0,0 --spacing-vert 1 --spacing-horiz 1 --chars 48,49,50,51,52,53,54,55,56,57,58 --font-size 88
Config file for BMFont:
# AngelCode Bitmap Font Generator configuration file
fileVersion=1
# font settings
fontName=Bebas Neue
fontFile=./fonts/BebasNeue-Regular.ttf
charSet=0
fontSize=-88
aa=1
scaleH=100
useSmoothing=1
isBold=0
isItalic=0
useUnicode=1
disableBoxChars=1
outputInvalidCharGlyph=0
dontIncludeKerningPairs=0
useHinting=1
renderFromOutline=0
useClearType=0
# character alignment
paddingDown=0
paddingUp=0
paddingRight=0
paddingLeft=0
spacingHoriz=0
spacingVert=0
useFixedHeight=0
forceZero=0
# output file
outWidth=256
outHeight=256
outBitDepth=32
fontDescFormat=0
fourChnlPacked=0
textureFormat=png
textureCompression=0
alphaChnl=4
redChnl=0
greenChnl=0
blueChnl=0
invA=0
invR=0
invG=0
invB=0
# outline
outlineThickness=0
# selected chars
chars=48-58
# imported icon images
I can try to reproduce the problem with your copy of bebas_regular.ttf, could you please share it?
Thanks for taking a look at this Vlad!
Here's my copy of Bebas Regular: https://io.lazarus.watch/_resources/other/bebas_regular.ttf
Let me know if I can be of any more help.
I tried with your font, the same result, then noticed your BMFont data file contains size=104, it means "Match char height" (Font Settings dialog) is not ticked (otherwise this value is negative). In this mode BMFont/fontbm sizes don't correspondent to each other, I think it was the problem.
added a notify about char sizes to README
Hi Vlad,
First off, FontBM seems like a great tool that should work perfectly for my project. I appreciate the work you've done with it.
I've been able to integrate it seamlessly so far, I'm just running into one issue.
I generated a font using FontBM on macOS, and I noticed the size of the characters generated by FontBM differ quite a lot from the exact same (or even slightly lesser) font size on BMFont.
BMFont
FontBM
This is strange since the font size on FontBM is even a tad smaller than the one on BMFont, yet the fonts themselves are still larger. You can also see this numerically by checking the width/height values of each character.
BMFont (truncated to save space)
FontBM (also truncated)
The command I'm using to generate this font is:
fontbm --font-file fonts/bebas_regular.ttf --output ./notenduro/resources-round-240x240/fonts/watchface/bebas_time_large --background-color 0,0,0 --spacing-vert 1 --spacing-horiz 1 --chars 48,49,50,51,52,53,54,55,56,57,58 --font-size 88
Is there something I'm doing wrong here?
Thank you very much for your time.