If your server runs a Unix it could very well be that there's no Arial
font available.

If I'm not wrong, yes, your listFonts() method should show the fonts
available to Batik. Except that it doesn't list any SVG fonts embedded
in the document.

On 11.02.2008 14:34:11 Dylan Browne wrote:
> Hi all,
> 
>  
> 
> I have a question regarding the fonts that are available to the
> ImageTranscoder classes.
> 
>  
> 
> Would it be correct to assume that the list of fonts returned from the
> following snippet of code correctly and completely identify the fonts
> that are available to a, for example, PNGTranscoder.
> 
>  
> 
>       private void listFonts() {
> 
>             // get the local graphics environment
> 
>             GraphicsEnvironment graphicsEvn =
> GraphicsEnvironment.getLocalGraphicsEnvironment();
> 
>             // get all the available fonts
> 
>             String availFonts[] =
> graphicsEvn.getAvailableFontFamilyNames();
> 
>             System.out.println("The following fonts are available for
> use:");
> 
>             for (int i = 0; i < availFonts.length; i++) {
> 
>                   System.out.println(availFonts[i]);
> 
>             }
> 
>       }
> 
>  
> 
> I have encountered a situation in which occasionally a PNG derived from
> SVG is skewing the alignment of the text (it seems to ignore the
> basline-shift attribute). An examination of the fonts available using
> the above code indicates that my chosen font, Arial, is not available.
> The actual font incorporated in the PNG is definitely not Arial, and
> seems to be some basic system font.
> 
>  
> 
> The initial SVG itself is rendered fine in the browser, but I assume
> that the fonts there are being retrieved from the client. The PNG
> transcode is carried out on the server, where the above code seems to
> suggest that Arial is not available. Could this be the cause of the
> problem?
> 
>  
> 
> Thanks very much in advance for any advice,
> 
>  
> 
> Dylan 
> 
>  
> 




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to