Hello!

I'm sending this second time and hope to get an answer. It is a kind of
getting critical for me.
Please, help me.

Thanks,
Alex

----- Original Message -----
From: "Alex G." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 01, 2002 15:35
Subject: [JAVA2D] Fonts in Java and Windows, TextOut vs drawString


> Hello,
>
> I have asked in newsgroups and forums, but there are
> no useful feedback or no reply at all.
>
> Here is the question
>
> I need to render documents (Wang Imaging annotations,
> that use LOGFONT Windows
> struct.) in my Java App exactly like the Windows App.
> shows.
> There are several issues related to fonts and
> rendering:
>
> 1. Font sizes. (I almost resolved the problem)
> 2. Font styles. I noted that Java does not work
> properly with native fonts.
> Sometimes, it ignores font styles. I did apply
> workarounds recommended in
> the bug tracking db. It helps only for some fonts, not
> for all.
> 3. Mapping character sets.
> 4. Positioning. TextOut uses left topmost corner.
> drawString uses the
> baseline. Also, Windows displays some extra space at
> the top. I could not
> calculate its size from FontMetrics. Also, there are
> issues horizontal
> positioning when I use Italic.
> 5. StrikeOut and Underline - also different look. Is
> there any means to impact on that?
> 6. Also, I noted when I use some rare font Java draws
> some garbage along
> with text.
> 7. When I use antialiasing, fonts are thicker than
> needed. Moreover, font styles are ignored.
> 8. Is there any dependency on what version of JRE I
> use?
>
> This is an example:
> I would like to print 'H' in Tahoma, 72, Bold (Windows
> format) at (100, 200).
>
> Font sizes:
> In Windows font size is 72 pixels.
> In Java this is equal to 96 points (72 px * 96 (screen
> resolution from Toolkit) / 72 (pixels per point) = 96
> points).
> The real height in Windows and Java will be 64 px.
> That's fine. For some fonts this does not work.
>
> Positioning. See example above.
> According to the doc I should use y-coordinate 200 +
> 72 (font size) = 272.
> In fact we have :
> Java text 14 pixels below than expected.
>
> I do use AttributedString and TextAttribute classes to
> render text. I don't want to use Microsoft's classes.
>
> I believe only Sun can help as they have developed
> awt.dll.
>
> Please help!
>
> Thanks in advance,
> Alexander Glazkov
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Greetings - Send FREE e-cards for every occasion!
> http://greetings.yahoo.com
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff JAVA2D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to