You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by pe...@gresham-forms.co.uk on 2004/08/11 13:42:35 UTC

RE: bold font rendering problem (was :- problem with text Scale t rans form on bold font)

Hi Thomas,

Thanks again for your help.

I am using Java 1.4.2, Squiggle 1.5.1, Windows 2000 and Batik 1.5.1 .

I am still not sure that I understand whats going on with fonts 
  If I explicitly use Times New Roman then font-weight="bold" works a treat,
and ASV6 and Squiggle have identical glyphs.
  If I explicitly use Times Roman then ASV6 looks ok, but Squiggle does not
display a Times font and seems to default to whatever font family was
defined in the SVG before this (in my current example Univers Medium). On my
system Times New Roman is an OpenType font and Times Roman a TrueType font.
  If I use some arbitrary made up font-family name eg. "test" then ASV6 and
Squiggle both default to some other font.
  
  In my application a call to
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts()
returns both 
 Times Roman and Times New Roman font names.
  ASV6 seems to find "Times Roman" whereas Batik/Squiggle does not. Both
find "Times New Roman". Neither find "test" (fair enough).

In my system fonts I have "Univers Bold" (TTF) which I would like to use but
it is not listed by getAllFonts(), I don't know why. I am trying to catch
missing system fonts in my application using both
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontF
amilyNames()
and
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(), If
I use font-family="Univers Bold" then neither of the above methods find that
font, if I take out the font check code then the Univers Bold font seems to
be used  (the bold glyphs do not look like they were generated from some
other Univers font). 

Are there other ways to get check for missing system fonts using Batik
classes ?

Thanks,

Patrick



-----Original Message-----
From: Thomas DeWeese [mailto:Thomas.DeWeese@Kodak.com]
Sent: 10 August 2004 18:01
To: Batik Users
Subject: Re: bold font rendering problem (was :- problem with text Scale
t rans form on bold font)


Hi Patrick,

    It looks like the problem is that the 1.3 JDK isn't using the Times
New Roman Bold font it was generating the bold version.

    Two possible solutions:
	1) Switch the JDK 1.4 for me at least 1.4 appears to be using
            the bold font.
         2) Explicitly reference the true type font, or generate an SVG
            Font from the bold times font, assuming the usecase makes
	   this practical and you respect the appropriate licenses.

pegan@gresham-forms.co.uk wrote:

> I should have posted a non-working example.
> Try changing weight to bold and look with magnification particularly at
the
> numbers 2 and 3.
> I have attached screenshots.
> 
> Thanks for rapid response.
> 
> Patrick
> 
> 
> -----Original Message-----
> From: Thomas DeWeese [mailto:Thomas.DeWeese@Kodak.com]
> Sent: 10 August 2004 17:09
> To: Batik Users
> Subject: Re: bold font rendering problem (was :- problem with text Scale
> trans form on bold font)
> 
> 
> Hi Patrick,
> 
>     Works for me.  Can you provide small screen shots?  Also
> your example was for 'normal' not bold rendering.  So describing
> exactly how you got the distorted bold rendering might be helpful.
> 
> pegan@gresham-forms.co.uk wrote:
> 
>  >
>  >
>  > Hello,
>  >
>  > Actually I have just realised that I have removed the transform from
the
>  > sample svg in my attempts to isolate the problem. The problem is still
>  > there so that implies that I have a bold font rendering problem not a
>  > scaling transform problem.
>  >
>  > This is still the SVG test file I have been using.
>  > <?xml version="1.0" encoding="UTF-8" standalone="no"?>
>  > <svg version="1.0" width="792" viewbox="0 0 1118 792" height="1118"
>  > xmlns=" <http://www.w3.org/2000/svg> ">
>  > <text x="200" font-size="30pt" y="200" font-family="Times"
>  > font-weight="normal" font-style="normal" opacity="1"
>  > font-stretch="normal">4230-0091-06-0060</text>
>  >
>  > </svg>
>  >
>  >
>  > Still need help.
>  >
>  > Thanks
>  > Patrick
>  >
>  >
>  > _____________________________________________________________________
>  > This e-mail has been scanned for viruses by MCI's Internet Managed
>  > Scanning Services - powered by MessageLabs. For further information
>  > visit http://www.mci.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
> 
>  
> _____________________________________________________________________
> This e-mail has been scanned for viruses by MCI's Internet Managed 
> Scanning Services - powered by MessageLabs. For further information 
> visit http://www.mci.com
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


_____________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com