[color=#008000]Juce is a great gui I ever seen!
Thank you, jules!
sorry for my poor English.
I am try to using Juceās GUI and misc library, and in future maybe I will add some features on it.
audio library is not necessary for me, so I remove the audio relative files in the source tree.
I will make my notes in this post,such as questions, solutions,etc.
[/color]
Sounds like making life difficult for yourself. Iād say just ignore them - you can disable all the audio devices and formats with config flags, if youāre worried about it bloating your exe. (TBH I could probably add a config flag to disable audio code too, that might be useful for a lot of people)
help!
my first question is the font problem.
I want the components could support Chinese character display, but I couldnāt find a good place to modify the componentsā font.
the button component:
/** This can be overridden to use different fonts than the default one.
Note that you'll need to set the font's size appropriately, too.
*/
virtual const Font getFont();
it seems I could modify the font here, I write a derived class TestTextButton override getFont and it works.
but when I check LookAndFeel::drawPopupMenuItem()method, the getPopupMenuFont() method is a member of LookAndFeel,
if I want to modify the font I could modify LookAndFeel, not derive a popupmenu class.
const Font LookAndFeel::getPopupMenuFont()
{
return Font (17.0f);
}
I try to modify the Font classās constructor, so the default typefacename will be other font that support Chinese, but I modify
const String Font::getDefaultSansSerifFontName() throw()
{
static const String name ("<Sans-Serif>");//modify here with "<å®ä½>"
return name;
}
but it doesnāt work.
so, is there a better method to modify the componentsā font, or in a general way?
what can I do to change the font?
Thank you.
which is better?
could change the default font, and so all the components could display Chinese character.this is the easiest way to support unicode character display
right?
I want to improve the text display effect on Win32 platform, maybe I will change the drawing code to native gdi/gdi+ api, currently the text performance is not as good as native apiā¦
āimproveā is a subjective term. Personally, Iāve always hated MSās font renderer because it doesnāt use sub-pixel spacing. I think that may have changed with Direct2D, so when I add support for that, Iāll also try their font rendering, but Iād advise you to steer well clear of the piece of crap that is the GDI/GDI+.
I am sorry if I kind of āhurtā you.
your code is great but I found that with MSās Clear Type, the text rendering effect is greatly
improved.
[attachment=0]clear type juce.PNG[/attachment]
And I want to use Clear Type in Juce,may I ,how could I do?
Thank you, dear Jules. I just write a little and then get your reply, you are so good.
Cleartype does look good, but itās the non-subpixel spacing that Iāve always hated. (I think that might be sorted out now in Windows 7ā¦?) Anyway, the only way to use it would be to create a Direct2D renderer like I did on the mac with CoreGraphics.
After a long timeās disappear, I am back again!
for some reason I didnāt came here for about a month, but now I have get my time, and I will continue to learn and develop juce library.