*/}}

2 Commits 553a96976a ... 76a265a5ae

Author SHA1 Message Date
  YimingWu 76a265a5ae linux fix 2 months ago
  YimingWu 553a96976a linux fix 2 months ago
1 changed files with 5 additions and 5 deletions
  1. 5 5
      la_tns_kernel.c

+ 5 - 5
la_tns_kernel.c

@@ -2890,11 +2890,11 @@ int tnsLoadSystemFont(char* from, char* name){
         args.memory_base=fontdata; args.memory_size=filesize;
         if(FT_Open_Face(f->ftlib, &args, -1, &face )) continue;
         num_faces = face->num_faces; FT_Done_Face(face); int found=0;
-        //for(int fa=0;fa<num_faces;fa++){
-        //    if(FT_Open_Face(f->ftlib,&args,fa,&face)){ continue; }
-        //    if(strstr(face->family_name,"SC")){ found=1; break; }
-        //    FT_Done_Face(face);
-        //}
+        for(int fa=0;fa<num_faces;fa++){
+            if(FT_Open_Face(f->ftlib,&args,fa,&face)){ continue; }
+            if(strstr(face->family_name,"SC")){ found=1; break; }
+            FT_Done_Face(face);
+        }
         if(found){ f->ftface[f->NumFaces]=face; }else{ if (FT_Open_Face(f->ftlib, &args, 0, &f->ftface[f->NumFaces])) continue; }
         FT_Select_Charmap(f->ftface[f->NumFaces], FT_ENCODING_UNICODE);
         FT_Set_Char_Size(f->ftface[f->NumFaces], 0, GenHeight << 6, 96, 96);