summaryrefslogtreecommitdiff
path: root/src/fontcache.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2018-05-26 16:13:12 +0200
committerMichael Lutz <michi@icosahedron.de>2018-06-06 21:37:09 +0200
commit768a31bfe3bc8da1482e0c7115bc46bf90b1e7ec (patch)
treebf5534df4faf1a9d48edbf355b8e7c1fa2ef2cb9 /src/fontcache.cpp
parenta4278c302b7721d22e4501315b5a1713f5471163 (diff)
downloadopenttd-768a31bfe3bc8da1482e0c7115bc46bf90b1e7ec.tar.xz
Add: [Win32] Text layout using the native Windows Uniscribe library.
Uniscribe is sometimes producing different results compared to ICU, especially when RTL and LTR content is mixed. Comparing the results to other programs (like editors or web browsers) leads me to believe that the result are at least not worse than ICU and possibly better.
Diffstat (limited to 'src/fontcache.cpp')
-rw-r--r--src/fontcache.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fontcache.cpp b/src/fontcache.cpp
index 72e42ccbb..1b070e1e5 100644
--- a/src/fontcache.cpp
+++ b/src/fontcache.cpp
@@ -86,6 +86,7 @@ public:
virtual GlyphID MapCharToGlyph(WChar key) { assert(IsPrintable(key)); return SPRITE_GLYPH | key; }
virtual const void *GetFontTable(uint32 tag, size_t &length) { length = 0; return NULL; }
virtual const char *GetFontName() { return "sprite"; }
+ virtual bool IsBuiltInFont() { return true; }
};
/**
@@ -250,6 +251,7 @@ public:
virtual GlyphID MapCharToGlyph(WChar key);
virtual const void *GetFontTable(uint32 tag, size_t &length);
virtual const char *GetFontName() { return face->family_name; }
+ virtual bool IsBuiltInFont() { return false; }
};
FT_Library _library = NULL;