On 2017-10-13 16:11+0200 Alaric Senat wrote:

Hi,

I'm trying to simply change the font of the texts in plplot by another one,
I found a lot of things in the doc' to change the font in the way to make it
Italic or Serif etc. But I'm wondering if there is no way to specify a font
file
like a .ttf, for example. It's good to know that I'm using Plplot with the
wxwidgets
Driver.

From what I read in the documentation it seem's that i'm limited by the
30 possibilities of plplot FCI system.

Yes.  PLplot uses generic fonts.  I got that idea from the SVG
graphics format, and all of the pango/cairo, Qt, and wxWidgets suites of
graphical libraries.  See the first part of
<http://docs.wxwidgets.org/3.1/overview_font.html> for the generic
fonts used by wxwidgets.

What generic fonts mean in practice is for each (unicode)
glyph requested by the PLplot users via the UTF-8 encoded string to be
plotted, the operating system supplies that glyph using the "best"
system font of the particular generic kind (Sans, Serif, etc.)
requested by the PLplot user. Where "best" is typically defined by how
fontconfig is set up.

The results are normally good.  For example, see
<http://plplot.org/examples.php?demo=02> and click
on the screenshots of the two pages of that example
which show what the (PLplot default) sans serif, upright,
normal weight font looks like.  (Those screenshots
were generated by -dev pngcairo, but all cairo and
qt results look like this for that example.)

To check what wxwidgets does in this regard I
ran

examples/c/x02c -dev wxwidgets

and the result is an italic font, i.e., not what
is intended at all for that example!  So as a result
of this discussion, I have found a bug in the font
selection by -dev wxwidgets, and once that is sorted
out, I suspect you will be much more satisfied with
the generic font choice for -dev wxwidgets.

To be continued by discussion in the plplot-devel mailing
list, but once the bug is resolved, I will let you
know here.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to