first effort to use all unicode chars from ttf font
authorborg323 <4010067-borg323@users.noreply.gitlab.com>
Mon, 10 Jun 2019 19:07:38 +0000 (22:07 +0300)
committerborg323 <4010067-borg323@users.noreply.gitlab.com>
Mon, 10 Jun 2019 19:07:38 +0000 (22:07 +0300)
src/sdl/sf_ftype.c

index 46ed61ee2ebc3fcfab2179fe7bf155cac3799579..6b83d8fc7b45b035e71ffa5d7f0bf1bae282c070 100644 (file)
@@ -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 );