Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #1751

Re: pdfcairo terminal and spaces/hyphens in font names

Newsgroups comp.graphics.apps.gnuplot
Subject Re: pdfcairo terminal and spaces/hyphens in font names
References <op.wu43b6cbzrz2e1@aluminiumdreams.local>
From "Ed Bennett" <ed.bennett@ntlworld.com>
Message-ID <op.wu81byw0zrz2e1@aluminiumdreams.local> (permalink)
Organization virginmedia.com
Date 2013-04-09 02:05 +0100

Show all headers | View raw


On Sat, 06 Apr 2013 22:58:44 +0100, Ed Bennett <ed.bennett@ntlworld.com>  
wrote:
> However, if the
> font has a hyphen in its name (e.g. BKM-cmr12) then the hyphen
> is replaced with a space, and Pango complains it can't find the font.
> Meanwhile for setting fonts locally in text elements, I've been using
> {/[fontname] text}, which works for fonts with hyphens in their
> name but not spaces. I've tried using spaces, hyphens, spaces
> escaped with a backslash, and omitting the spaces; all results give
> Pango warnings for missing fonts, and with both the space and
> escaped-space versions only the first word (with or without
> backslash) is looked for.

Hi again,

I've delved into the source, and solved part of the problem; the  
substitution for - was occurring in gp_cairo_set_font, but not in  
enhanced_recursion, where I've added a similar substitution (but changed  
both cases to "|" to avoid the breaking of hyphenated fonts; I've never  
seen a font with a pipe in) -- this now works, allowing fonts with spaces  
in their names. Unfortunately, Bold and Italic fonts still can't be  
specified in enhanced text, since the parsing of the specifiers is also  
carried on in gp_cairo_set_font (and this time can't be done in  
enhanced_recursion as it's terminal-dependent). From what I can see (since  
I don't completely understand the code), gnuplot should be calling  
gp_cairo_set_font to set the font from the enhanced text, but obviously  
that's not what's going on since the - substitution was not working, and  
neither is the Bold/Italic one. So the question is how is the font being  
changed at all given that it's not being done through gp_cairo_set_font...

Any answers would be much appreciated!

Cheers

Ed

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Find similar


Thread

pdfcairo terminal and spaces/hyphens in font names "Ed Bennett" <ed.bennett@ntlworld.com> - 2013-04-06 22:58 +0100
  Re: pdfcairo terminal and spaces/hyphens in font names "Ed Bennett" <ed.bennett@ntlworld.com> - 2013-04-09 02:05 +0100

csiph-web