From 54d277b2e4b749cc0e5cd7c0e0d6b92539798d11 Mon Sep 17 00:00:00 2001 From: borg323 <4010067-borg323@users.noreply.gitlab.com> Date: Mon, 10 Jun 2019 22:07:38 +0300 Subject: [PATCH] first effort to use all unicode chars from ttf font --- src/sdl/sf_ftype.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sdl/sf_ftype.c b/src/sdl/sf_ftype.c index 46ed61e..6b83d8f 100644 --- a/src/sdl/sf_ftype.c +++ b/src/sdl/sf_ftype.c @@ -156,7 +156,7 @@ static MYFONT * makefont( int totglyphs) return res; } -#define MAXUNI 0x153 +#define MAXUNI 0xffff static void setglyph( MYFONT *f, FT_Face face, int ch) { @@ -167,6 +167,8 @@ static void setglyph( MYFONT *f, FT_Face face, int ch) int i,j, nbypr; FT_Bitmap *bitmap; + if (!gid) return; + if (m_aafonts) mode = FT_RENDER_MODE_NORMAL; err = FT_Load_Glyph( face, gid, 0); @@ -233,9 +235,7 @@ static SFONT * loadftype( char *fname, int size, SFONT *like, int *err) res->minchar = 32; setglyph(res,face,0); for (i=32;i<127;i++) setglyph(res,face,i); - for (i=0xa0;i<256;i++) setglyph(res,face,i); - setglyph(res,face,0x152); - setglyph(res,face,0x153); + for (i=0xa0;i<65536;i++) setglyph(res,face,i); FT_Done_Face( face ); -- 2.34.1