Commit (HEAD): Font Preview

From: j.m.maurer (
Date: Thu Aug 22 2002 - 14:40:55 EDT

  • Next message: j.m.maurer: "Re: Commit (HEAD): Font Preview"

    The implementation is mostly done in XP. I implemented the GTK2 code as
    well. There's 1 bug left in the code which I can't seem to fix, which is
    also present in the Font dialog: the first time the window pops up, no
    font is displayed. I can't figure this out, could someone else look into
    this? Also, the font lookup feels quite slow (using XFT), and I suspect
    this is caused by the XAP_Preview_FontPreview class which I used (it
    already existed, I didn't create it);

    If you want to add this to another platform as well, just do the

    1) write a class XAP_<Platform>FontPreview which should just create and
    show a popupwindow with a drawing area in it. Have a look at
    XAP_UnixFontPreview to see how this works ( only 30 lines of code! )

    2) instantiate this class in your toolbar code when the font combobox is
    opened. When the font name is changed, call the functions
      XAP_<Platform>FontPreview->setFont(<selected fontname>);
    Have a look at ev_UnixToolbar.cpp lines 228 to 245 for the unix

    That's all!

    A screenshot can be found here:

    This archive was generated by hypermail 2.1.4 : Thu Aug 22 2002 - 14:43:43 EDT