diff options
author | nyamatongwe <unknown> | 2000-03-08 13:56:46 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2000-03-08 13:56:46 +0000 |
commit | fdadfbf88b6ef8abfc4ee6d0d07fa76cd6f79cf1 (patch) | |
tree | 5cb35872b66ae9f021ecf762de4b03e416e2d2fe /gtk/PlatGTK.cxx | |
parent | 9367896cf64d36c501f545690f68faf544f6c09d (diff) | |
download | scintilla-mirror-fdadfbf88b6ef8abfc4ee6d0d07fa76cd6f79cf1.tar.gz |
Made work on GTK+/Linux.
Diffstat (limited to 'gtk/PlatGTK.cxx')
-rw-r--r-- | gtk/PlatGTK.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index e074aed17..5da2a3a94 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -381,8 +381,12 @@ void Surface::DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char void Surface::MeasureWidths(Font &font_, const char *s, int len, int *positions) { int totalWidth = 0; for (int i=0;i<len;i++) { - int width = gdk_char_width(font_.id, s[i]); - totalWidth += width; + if (font_.id) { + int width = gdk_char_width(font_.id, s[i]); + totalWidth += width; + } else { + totalWidth++; + } positions[i] = totalWidth; } } |