Hello,
I've just split the Font class in saner bits:
* Font::FontBits -> FontInfo
* Font::FONT_XXX -> all enums transfered to FontEnums.h and renamed to
FontXxx
I've replaced Font uses with FontInfo were the language() member was not
needed, basically all draw() and metrics methods.
There was one problematic case with InsetQuotes which I solved by taking
the Buffer main language (we can probably do better by setting the
language of the Inset when applying a different language). In any case,
passing the language at draw() and metrics time was very wrong conceptually.
Anyway, I think the language and font information should not be in the
same class. I don't understand why we are forced to set a font when we
only want to set the language for example. What we need is a templated
'Range' class that will work with Fonts and Languages. Basically, the
current FontList will be a specialisation of this template:
typedef Range<FontInfo> FontList;
And we need the same thing for languages:
typedef Range<Language> LanguageList;
Ideas, comments?
PS: Dov, there could be some problems with this last commit and bidi
support. I've tried hard to only change the interfaces and to maintain
the logic but bugs happen. Please let me know if there's anything wrong.
Abdel.