John Levon <[EMAIL PROTECTED]> writes:
| +#include <map>
| +
| +#include "encoding.h"
| #include "lyxfont.h"
|
| #include <qfont.h>
include order
| @@ -44,6 +47,10 @@
| QFontMetrics const & metrics(LyXFont const & f) {
| return getfontinfo(f)->metrics;
| }
| +
| + /// return pixel width for the given unicode char
| + short charwidth(LyXFont const & f, Uchar val);
| +
"short" makes me go: "Hu! Why? Anything special going on here?"
| - font_info const * fi =
|fontinfo_[f.family()][f.series()][f.realShape()][f.size()];
| + font_info * fi =
| fontinfo_[f.family()][f.series()][f.realShape()][f.size()];
And why cannot these be left const?
| if (!fi) {
| fi = new font_info(f);
and give this one its own variable. (I hate double usage)
| fontinfo_[f.family()][f.series()][f.realShape()][f.size()] = fi;
| @@ -33,6 +32,12 @@
| return fontloader.metrics(f);
| }
|
| +
| +int charwidth(Uchar val, LyXFont const & f)
| +{
| + return fontloader.charwidth(f, val);
| +}
Where did the short (Hu! Why! Anything special going on here?) go?
Other than this it looks ok to me.
--
Lgb