> On Saturday 29 April 2006 12:25 am, Timoth=E9e Lecomte wrote:
>> After 11 months of development, the wxWidgets has landed to the CVS !
> There are still some points that I do not understand about the terminal=
> even though I've been using it for a while now.
> Could you provide some additional information on
> - where does the terminal find its fonts? If I want to make a
> new font available to it, where do I put it or what do I need
> to change in the system configuration?
This is not explicitely detailed in the pango documentation, but it seems
reasonable to assume the following :
On Unix, pango can use any fonts that are know to FontConfig. Here is wha=
the GIMP documentation says about adding fonts to FontConfig:
"As soon as Fontconfig is properly setup, adding fonts is just a matter o=
placing them into a directory that is searched by Fontconfig. Have a look
at /etc/fonts/fonts.conf (and perhaps /etc/fonts/local.conf) to find out
what directories are searched. After copying the fonts there, you should
run fc-cache to regenerate the fonts cache. Fonts added this way will be
available to all applications using Fontconfig."
For example, on my system, /etc/fonts/fonts.conf says that it will look i=
The last line allows you to install a font in your home directory, so tha=
you don't need administrator rights to add a font. FontConfig will also
look for user configuration in ~/.fonts.conf
This file also sets some aliases. For example, my configuration file
states that if I choose "serif" as a font, it will use either Bitstream
Vera Serif, Times New Roman, Luxi Serif, Times, etc. Pango will use the
first one that is able to represent all the characters of the string it
has to render.
Note that I have not done anything to configure this. It is usually done
by the distribution, and it is likely that you desktop environment
provides a configuration utility to add fonts to FontConfig (KDE and Gnom=
On Windows, Pango will use the native Windows font system, so it should b=
customizable via the fonts control panel.
> - How do I disable the 'q' and 'spacebar' hotkeys.
> I know we've been discussing changing this everywhere,
> but how do I do it right now?
Currently you can't disable it. I'm sorry !
By the way, if I implement something to optionally disable it, this
'spacebar'/'q' topic may vanish again. Let's come up with a global
solution that everybody agrees on. Then I would be glad to implement it.
> - I do not understand what the logic is for resizing the plot
> drawn in a resized window. Unlike most (all?) other terminals,
> the plot is not always redrawn so that it fills the window.
> An explicit "replot" command always causes the plot to be redrawn
> so that it fills the window; why does the dynamic re-sizing behave
It will resize the plot to fit in the window, but will keep the aspect
ratio (width/height) constant, so that if you just increase the window
width, nothing happens.
This behaviour can be discussed, and if needed, options can be added to
the configuration dialog.
> - Also when the plot window is resized, sometimes the font size
> stays the same, sometimes it scales smoothly, and sometimes
> it jumps in increments.
I think it is related to the font antialiasing methods that are used by
pango. To make a font look nice on the screen, you have to make it fit to
the pixel grid. Here are the relevant parts of the cairo font
"Hinting is the process of fitting font outlines to the pixel grid in
order to improve the appearance of the result. Since hinting outlines
involves distorting them, it also reduces the faithfulness to the origina=
A side effect is that this fitting depends on the font size, so that the
font won't scale absolutely linearly with the window size.
> - (programmers question): If I want to add itenms to the configuration
> menu widget, what is required? For instance, could one add a font
> browser there?
The code for this widget lives in the wxtConfigDialog class.
A dialog like this is based on several controls (a checkbox, a slider,
etc.) embedded into "sizers", which will take care of their position in
the window (should the control be aligned on the left ? should it expand
with the window ? does it have a border around it ? etc.).
For example, you can easily add a checkbox for "ctrlq", which would behav=
as the checkbox for "raise" or "persist". When OK or APPLY is clicked, th=
value will be written in the wxConfig object, which represents a entry in
the registry under Windows, or a file ~/.gnuplot-wxt under Unix. This
value can then be used where appropriate.
I would be glad to give more details about it, but I would end up
rewriting the wxWidgets documentation ! (http://www.wxwidgets.org/manuals=
As far as a font browser is concerned, wxWidgets provides one :
It will list fonts and present a sample of the selected one.
I hope this helps.