ecere/gfx/fontManagement: Falling back to Arial Unicode MS on Windows
authorJerome St-Louis <jerome@ecere.com>
Mon, 11 Jul 2016 04:39:08 +0000 (00:39 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 28 Jul 2016 21:35:24 +0000 (17:35 -0400)
- Fixes international text not showing up with OpenGL driver

ecere/src/gfx/fontManagement.ec

index 84c73e5..b69d8f0 100644 (file)
@@ -453,6 +453,14 @@ public FaceInfo ResolveCharFont(const String faceName, float size, FontFlags fla
    if(pattern) FcPatternDestroy(pattern);
    if(matched) FcPatternDestroy(matched);
    if(charSet) FcCharSetDestroy(charSet);
+#elif defined(__WIN32__) && !defined(ECERE_NOFONTCONFIG)
+   {
+      // Fall back to Arial Unicode MS
+      char fileName[MAX_LOCATION];
+      GetWindowsDirectory(fileName, MAX_LOCATION);
+      PathCat(fileName, "fonts/arialuni.ttf");
+      info = { fileName = CopyString(fileName) };
+   }
 #endif
    return info;
 }