This Question is Assumed Answered

1 "correct" answer available (5 pts) 15 "helpful" answers available (3 pts)
4 Replies Last post: Jul 25, 2008 2:12 PM by mgordon

Smooth Fonts for Text and UI Objects ...

Jul 24, 2008 11:06 PM

Click to view URPradhan's profile Level 7 URPradhan 141 posts since
Mar 6, 2008
Friends

Though I have set my applications rendering mode to high-quality, I'm not getting high quality graphics.

1. Mainly the fonts of UI objects (like CommandButtons, Menu, Grid, etc ...) are NOT smooth. It looks like an arrangement of few pixels in a thread (though technically all are pixels :)). If you see native windows controls or fonts of a flash based application they are really smooth. Like in Windows XP on display -> appearance properties -> Effects, there is an option for font smoothness for "Standard" or "Clear Type" and Clear Type gives better look and smooth fonts. Is there any way to get really smooth fonts for UI objects in Curl ? I believe its related to anti-aliasing implementation of Curl.

2. How to apply same font family, size, color of all text, UI Objects fonts globally to my whole application (like a non-local option) ? Means I'll specify at one place may be at start.curl and all UI objects (text + controls) will have same font, color, size.

Thank you
Click to view carl's profile Curl carl 74 posts since
Oct 17, 2007
1. Re: Smooth Fonts for Text and UI Objects ... Jul 25, 2008 3:21 AM
Addressing your second point, you can set options on the LookAndFeel you are using to have them apply to all the controls that use that LookAndFeel. Since most applets only use one main LookAndFeel, this gives you a central point to alter control options.

Also, many of the options that you mention are nonlocal options, so you could set them at your graphical root, perhaps also setting control-appearance-changeable? = true to make controls follow the usual option lookup rules instead of the LookAndFeel pathway described above.

If you're also using a style sheet, this becomes a bit more complicated, as your style sheet will likely be setting some of these options on individual Controls. In that case, you would need to change your style rules.
Click to view Duke's profile Curl Duke 154 posts since
Oct 17, 2007
2. Re: Smooth Fonts for Text and UI Objects ... Jul 25, 2008 8:09 AM
Curl does not currently use ClearType. We have a bug 28915 about this, so we might change to use ClearType in a future release.
Click to view URPradhan's profile Level 7 URPradhan 141 posts since
Mar 6, 2008
3. Re: Smooth Fonts for Text and UI Objects ... Jul 25, 2008 11:14 AM
in response to: Duke
Thank you friend for educating me.


Infact from day 1 of my curl association, I'm missing this smoothness in Curl UI objects/text and I believe it should be a bare minimum thing to have in curl, as now-a-days RIA applications are really eye catching, attractive, full of transition /flying effects which tends the user to play with the application. You can pickup any Flex application from their showcase samples or Silverlight implementation of AOL mail. Recently I heard Yahoo Mail Japan also now using Flex.


Thank you

Click to view mgordon's profile Curl mgordon 47 posts since
Oct 17, 2007
4. Re: Smooth Fonts for Text and UI Objects ... Jul 25, 2008 2:12 PM
A little more about the control-appearance-changeable? option:

Controls in Curl are generally used in two contexts: in a Dialog, where you want them to use the fonts that the host OS uses in dialogs, or in a document or UI, where you may want them to match the rest of the text in the document (or UI). Set control-appearance-changeable?=true and the controls inherit properties from their container, instead of from the system. I think this is what you want. You can set it at the top level of your applet if you put set-document-properties at the top of your applet:

{set-document-properties
    control-appearance-changeable? = true,
    color = "green",
    font-size = 16pt
}


You can set any options here and they are plugged in at the top level of your applet.