Jump to content

Recommended Posts

Posted

I've found an issue with the online font converter (or maybe rather mcufont that is running on your server). I was trying to convert Dejavusans to a 32 size font sorted "0" - ":" characters however I've noticed you can also use "Numbers" filtering as well to reproduce the issue.

 

The problem is when generated, the font structure contains an invalid value for "baseline x." It should be "2" but is actually outputting "-2." Since baseline is unsigned, this ends up being 254 and the result is the font doesn't display!

 

I've attached the original ttf file for you to try as well.

const struct mf_rlefont_s mf_rlefont_DejaVuSans32 = {
    {
    "DejaVu Sans Book 32",
    "DejaVuSans32",
    17, /* width */
    23, /* height */
    20, /* min x advance */
    20, /* max x advance */
    -2, /* baseline x */
    23, /* baseline y */
    37, /* line height */
    3, /* flags */
    32, /* fallback character */
    &mf_rlefont_character_width,
    &mf_rlefont_render_character,
    },
    4, /* version */
    mf_rlefont_DejaVuSans32_dictionary_data,
    mf_rlefont_DejaVuSans32_dictionary_offsets,
    28, /* rle dict count */
    36, /* total dict count */
    1, /* char range count */
    mf_rlefont_DejaVuSans32_char_ranges,
};

 

font_convert_settings.png

DejaVuSans.ttf

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...