>>>>> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:
Abdelrazak> Basically, I replaced all methods in the font_metrics Abdelrazak> namespace by a proper virtual interface FontMetrics. The Abdelrazak> FontLoader is _the_ container for FontMetrics. Abdelrazak> This patch should also bring some optimisation in a number Abdelrazak> of place in the code. This is because we do not need any Abdelrazak> more to search for the LyXFont at each font_metrics call. So what you gain is the lookup in the 5-dimensional array, right? Abdelrazak> In effect, the speed advantage is not as sensible and this Abdelrazak> is a bit deceiving considering that this was my primary Abdelrazak> motivation behind the patch. Accessing an array is rather cheap, so it is not a huge surprise... Abdelrazak> But I like the patch anyway as it cleans up the relation Abdelrazak> and interfacing between fonts, metrics and frontends. I am not sure the gain is worth the big code change... But I am not the one who does it! Abdelrazak> Ideally, we shall not use any of these frontend metrics in Abdelrazak> the "kernel" but that's a pretty far goal for now. How would you do that? Abdelrazak> Some of these call can be eliminated if we change Abdelrazak> Painter::text() to return the width of the drawn text Abdelrazak> instead of recalculating it afterwards. I will do that Abdelrazak> once this patch is in. This seems much more promising. JMarc