diff options
author | nyamatongwe <unknown> | 2004-03-29 12:43:42 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2004-03-29 12:43:42 +0000 |
commit | 0f755cbbab64741e1e8ef4e8d66d29d652b96a4c (patch) | |
tree | 4de0cffaab2c955698522a743196e23f1ebeede4 | |
parent | f405e5a0a3ed16539e4ba0d88440d999fd077fad (diff) | |
download | scintilla-mirror-0f755cbbab64741e1e8ef4e8d66d29d652b96a4c.tar.gz |
Patch from Robin Dunn to pass an extra flag down to
font rendering to allow a platform-specific tweak.
-rw-r--r-- | gtk/PlatGTK.cxx | 7 | ||||
-rw-r--r-- | include/Platform.h | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index bfd5166c5..18d0ea8bd 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -645,7 +645,8 @@ Font::Font() : id(0) {} Font::~Font() {} -void Font::Create(const char *faceName, int characterSet, int size, bool bold, bool italic) { +void Font::Create(const char *faceName, int characterSet, int size, + bool bold, bool italic, bool) { Release(); id = FontCached::FindOrCreate(faceName, characterSet, size, bold, italic); } @@ -1169,7 +1170,7 @@ void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char bool draw8bit = true; if (et != singleByte) { GdkWChar wctext[maxLengthTextRun]; - if (len >= maxLengthTextRun) + if (len >= maxLengthTextRun) len = maxLengthTextRun-1; int wclen; if (et == UTF8) { @@ -1331,7 +1332,7 @@ void SurfaceImpl::MeasureWidths(Font &font_, const char *s, int len, int *positi bool measure8bit = true; if (et != singleByte) { GdkWChar wctext[maxLengthTextRun]; - if (len >= maxLengthTextRun) + if (len >= maxLengthTextRun) len = maxLengthTextRun-1; int wclen; if (et == UTF8) { diff --git a/include/Platform.h b/include/Platform.h index eae194d52..99daf98ba 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -279,7 +279,8 @@ public: Font(); virtual ~Font(); - virtual void Create(const char *faceName, int characterSet, int size, bool bold, bool italic); + virtual void Create(const char *faceName, int characterSet, int size, + bool bold, bool italic, bool extraFontFlag=false); virtual void Release(); FontID GetID() { return id; } |