draconisPW / PWMAngband

A free, multi-player roguelike dungeon exploration game based on Angband
35 stars 11 forks source link

SDL2 Client - doesn't display custom characters font-sdl2.prf over 127 (0x7F) #582

Closed s88100 closed 1 year ago

s88100 commented 1 year ago

Checked in V works correctly font-sdl2.prf 1-255 but in PWMAngband client it shows up to 1-127

s88100 commented 1 year ago

accidentally found a solution client/main-sdl2.c render_glyph_mono() SDL_Surface surface = TTF_RenderGlyph_Blended(font->ttf.handle, (Uint8) codepoint, fg);

make_font_cache() SDL_Surface *surface = TTF_RenderGlyph_Blended(font->ttf.handle, (Uint8) g_ascii_codepoints_for_cache[i], white);

Uint8 — [0 : 255] and it worked, all 1-255 are displayed check please

draconisPW commented 1 year ago

Fixed by PR.