[reportlab-users] Font finding issue in CGI vs. command-line scripts

Robin Becker reportlab-users@reportlab.com
Thu, 28 Aug 2003 15:21:45 +0100


In article <19C19344-D935-11D7-860D-00039345C610@darwin.in-berlin.de>,
Dinu Gherman <gherman@darwin.in-berlin.de> writes
>Robin Becker:
>
>> .... Dinu the only thing I can think of is that the cgi script has
>> differing permissions ie is user nobody and perhaps cannot see the
>>
>>         /Users/dinu/Library/Fonts
>>
>> directory.
>
>A sensible thing to check (permissions always are). But my private
>font directory is readable for all users... Well, this will remain
>a bit of a mystery, then...
>
>Of course, the question remains if the renderers *really* need to
>set fonts, even in case they won't be needed at all?
>
>Dinu
>
>--
>Dinu C. Gherman
sorry then Dinu I can't help on the why of the non findable fonts. Is
/Users one of those strange virtual things? I seem to remember using
/users as well as /Users and being surprised they are the same.

Anyhow on the other front it seems we always have a default font set by
using  deltas = STATE_DEFAULTS.copy() in the _PMRenderer class draw
method.

The only fix for that would be to make the user always add a font or to
make the font loading lazy in some way. The latter is probably better,
but is arguably quite dangerous ie the system state could change between
the setFont and the need to actually load the font.
-- 
Robin Becker