*/}}
Browse Source

linux fix

YimingWu 2 months ago
parent
commit
553a96976a
1 changed files with 9 additions and 5 deletions
  1. 9 5
      la_tns_kernel.c

+ 9 - 5
la_tns_kernel.c

@@ -209,7 +209,11 @@ void tnsContextMakeFBOCurrent(tnsOffscreen* off){
 #endif
 }
 void tnsContextMakeWindowCurrent(laWindow* w){
+#ifdef _WIN32
     tnsContextMakeCurrent(w->glc,w->hdc,0);
+#else
+    tnsContextMakeCurrent(w->glc,w->win,0);
+#endif
 }
 #endif
 void tnsSwitchToCurrentWindowContext(laWindow* w){
@@ -2886,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);