how to use freetypye in native c

568 views
Skip to first unread message

zouqianqi

unread,
Oct 20, 2009, 4:22:18 AM10/20/09
to android-ndk
Dear all,

I am trying to use freetype in navtive c.
In linux, I use fontconfig to find the ttf file, then use freeype
to find the the font.
But I can't find fontconfig in Android.
So how can I use freetype in Android? Are there any samples?

Thank you!

Doug Schaefer

unread,
Oct 20, 2009, 10:35:58 AM10/20/09
to andro...@googlegroups.com
There is no freetype support in Android. This is something that I figure would be nice to do fonts in opengl. Let us know if you get it working.

Jack Palevich

unread,
Oct 20, 2009, 10:57:08 AM10/20/09
to andro...@googlegroups.com
Depending upon your goals, you might also consider using the built-in Android font system. Look at the "SpriteText" example in the SDK to see how to render text with OpenGL using the built-in Android font system. To use this with the NDK you would call back into Java from your native code.

zouqianqi

unread,
Oct 21, 2009, 5:41:42 AM10/21/09
to android-ndk
"fontconfig + freetype" is used in my program.
There is no "fontconfig" in andriod, so it can't match a ttf file
needed by freetype.
I also try to set a ttf file to freetype manually, and it seems
freetype can work.
So, I think freetype can be used, but I can't find a way, such as
fontconfig", to match the font library.

On 10月20日, 下午10时35分, Doug Schaefer <cdtd...@gmail.com> wr Iote:
> >   Thank you!- 隐藏被引用文字 -
>
> - 显示引用的文字 -

Mike Wuetherick

unread,
Oct 22, 2009, 10:39:00 AM10/22/09
to android-ndk
just use freetype on your development machine (linux, windows
whatever) to generate a bitmap font that is then used on the mobile
device? this is what we do for console / non-standard platforms as
you can't assume that any kind of library support is available on the
platform.

On Oct 20, 10:35 am, Doug Schaefer <cdtd...@gmail.com> wrote:
> There is no freetype support in Android. This is something that I figure
> would be nice to do fonts in opengl. Let us know if you get it working.
>
Reply all
Reply to author
Forward
0 new messages