]> git.lyx.org Git - features.git/commit
This commit is a big rework of the FontLoader/FontMetrics interaction. Only Qt4 for...
authorAbdelrazak Younes <younes@lyx.org>
Sat, 7 Oct 2006 16:15:06 +0000 (16:15 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sat, 7 Oct 2006 16:15:06 +0000 (16:15 +0000)
commit00edcc582ff7cfe9cbbc8f7458ea29649bd642d9
treecc3297e76e820ca97d68fb90abe3f9396909b324
parent99fc6935a5a6d01c2d1655d8ba560b5542fd3a97
This commit is a big rework of the FontLoader/FontMetrics interaction. Only Qt4 for now, I would be grateful is somebody steps up for qt3 and gtk.

Basically, I replaced all methods in the font_metrics namespace by a proper virtual interface FontMetrics. The FontLoader is _the_ container for FontMetrics.

This patch should also bring some optimizations in a number of place in the code. This is because we do not need any more to search for the LyXFont at each font_metrics call. In effect, the speed advantage is not as sensible and this is a bit deceiving considering that this was my primary motivation behind the patch. But I like the patch anyway as it cleans up the relation and interfacing between fonts, metrics and frontends.

* frontends/FontMetrics.h: new virtual interface. Renamed from font_metrics.h

* qt4/GuiFontMetrics: corresponding qt4 implememtation. Renamed from qfont_metrics.C. The smallCaps particular case treatment has been transfered here as well as the width cache for MacOSX and Windows.

* qt4/QLPainter.C: the smallCapsText has been reworked to return the width of the drawn text.C

all other files: replace font_metric helper function call with corresponding FontMetrics method calls.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15265 a592a061-630c-0410-9148-cb99ea01b6c8
46 files changed:
development/scons/scons_manifest.py
src/BufferView.C
src/cursor.C
src/dimension.C
src/frontends/FontLoader.h
src/frontends/FontMetrics.h [new file with mode: 0644]
src/frontends/Makefile.am
src/frontends/Painter.C
src/frontends/WorkArea.C
src/frontends/font_metrics.h [deleted file]
src/frontends/qt4/GuiFontLoader.C
src/frontends/qt4/GuiFontLoader.h
src/frontends/qt4/GuiFontMetrics.C [new file with mode: 0644]
src/frontends/qt4/GuiFontMetrics.h [new file with mode: 0644]
src/frontends/qt4/Makefile.am
src/frontends/qt4/QLPainter.C
src/frontends/qt4/QLPainter.h
src/frontends/qt4/qfont_metrics.C [deleted file]
src/frontends/qt4/qt_helpers.C
src/insets/insetbibitem.C
src/insets/insetcaption.C
src/insets/insetcharstyle.C
src/insets/insetcollapsable.C
src/insets/insetlatexaccent.C
src/insets/insetlatexaccent.h
src/insets/insetnewline.C
src/insets/insetpagebreak.C
src/insets/insetquotes.C
src/insets/insetspace.C
src/insets/insetspecialchar.C
src/insets/insettabular.C
src/insets/insettext.C
src/insets/insetvspace.C
src/insets/render_button.C
src/insets/render_graphic.C
src/insets/render_preview.C
src/lyxlength.C
src/mathed/InsetFormulaMacro.C
src/mathed/InsetMathBig.C
src/mathed/InsetMathChar.C
src/mathed/MathMacroTemplate.C
src/mathed/MathSupport.C
src/mathed/MathSupport.h
src/rowpainter.C
src/text.C
src/text2.C