diff options
Diffstat (limited to 'dw')
-rw-r--r-- | dw/fltkplatform.cc | 1 | ||||
-rw-r--r-- | dw/platform.hh | 9 | ||||
-rw-r--r-- | dw/style.hh | 1 |
3 files changed, 7 insertions, 4 deletions
diff --git a/dw/fltkplatform.cc b/dw/fltkplatform.cc index f5d686c4..21c0866a 100644 --- a/dw/fltkplatform.cc +++ b/dw/fltkplatform.cc @@ -122,6 +122,7 @@ FltkFont::FltkFont (core::style::FontAttrs *attrs) int xx, xy, xw, xh; fl_text_extents("x", xx, xy, xw, xh); xHeight = xh; + zeroWidth = (int) fl_width("0"); descent = fl_descent(); ascent = fl_height() - descent; } diff --git a/dw/platform.hh b/dw/platform.hh index 227cda33..be9b4a58 100644 --- a/dw/platform.hh +++ b/dw/platform.hh @@ -121,10 +121,11 @@ public: * is defined, which holds more platform dependent data. * * Also, this method must fill the attributes "font" (when needed), - * "ascent", "descent", "spaceSidth" and "xHeight". If "tryEverything" - * is true, several methods should be used to use another font, when - * the requested font is not available. Passing false is typically done, - * if the caller wants to test different variations. + * "ascent", "descent", "spaceSidth", "zeroWidth" and "xHeight". If + * "tryEverything" is true, several methods should be used to use + * another font, when the requested font is not available. Passing + * false is typically done, if the caller wants to test different + * variations. */ virtual style::Font *createFont (style::FontAttrs *attrs, bool tryEverything) = 0; diff --git a/dw/style.hh b/dw/style.hh index 12ca1664..12b7cbde 100644 --- a/dw/style.hh +++ b/dw/style.hh @@ -715,6 +715,7 @@ public: int ascent, descent; int spaceWidth; int xHeight; + int zeroWidth; static Font *create (Layout *layout, FontAttrs *attrs); static bool exists (Layout *layout, const char *name); |