nanogui: Thread: FLTK freetype font anti-alias


[<<] [<] Page 1 of 1 [>] [>>]
Subject: FLTK freetype font anti-alias
From: "Ricardo Jasinski" ####@####.####
Date: 5 May 2008 15:09:21 -0000
Message-Id: <ee9633130805050809i3ecbd8d2kc63b6ca280eea5da@mail.gmail.com>

Hello everyone,

suppose I want to render anti-aliased text from FLTK2. What would be the
recommended approach?

I can imagine a few workarounds, but I don't feel very confident about
anyone of them:

1) Hack the source code in nxlib and whenever it calls GrCreateFont, call
GrSetFontAttributes right afterwards;
2) Let FLTK create the font, get a handle to it from nano-X server, and call
GrSetFontAttributes;
3) Use the XFontStruct from FLTK, get the font handle from it, and call
GrSetFontAttributes.

I'm just throwing some options here, I've made some testing with the above
choices but I still feel there should be something that look less like a
hack...

Please send any comments and ideas and I will give them a try!

Thanks,

Ricardo.

---------------------------------------------------------
Ricardo Pereira Jasinski
####@####.####
Tel: (41) 9955-2852

LME - Laboratório de Microeletrônica da UTFPR
UTFPR Microelectronics Lab
www.lme.cpdtt.cefetpr.br
Tel: +55 41 3310 4756
Subject: Re: [nanogui] FLTK freetype font anti-alias
From: "Greg Haerr" ####@####.####
Date: 5 May 2008 19:22:28 -0000
Message-Id: <039501c8aee5$53351270$0300a8c0@RDP>

> suppose I want to render anti-aliased text from FLTK2. What would be the
recommended approach?

> 1) Hack the source code in nxlib and whenever it calls GrCreateFont, call
GrSetFontAttributes right afterwards;

I like this approach the best, I don't really see it as a hack.  The entire
option of whether or not NXLIB should support anti-aliased text,
(and thus the GrSetFontAttributes and other calls) could then be
handled solely within NXLIB.

Not requiring any other changes in FLTK or outside of NXLIB is
a huge advantage, and is really NXLIB's job.



> 2) Let FLTK create the font, get a handle to it from nano-X server, and 
> call
GrSetFontAttributes;
> 3) Use the XFontStruct from FLTK, get the font handle from it, and call
GrSetFontAttributes.

Both of these require modifying FLTK source, which is a bad idea.
You may need to use XFontStruct within NXLIB, but that should be
no problem.

Regards,

Greg 

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.