Android native work!

394 views
Skip to first unread message

sduclos

unread,
Dec 31, 2011, 9:40:55 AM12/31/11
to freetype-gl
Hi,

I got freetype-gl running on Android (xoom) and GLES2 with Roboto-
Regular.ttf
(the new fonts in Android 4.0 - Ice Cream Sandwich).

Awesome!


I find that font rendering on Android native to be quit a challenge.

But now, thanks to your code, problem solve!


I can post my notes of my port .. but all in all it's pretty much the
same as the original code (vector.[ch], vec234.h, texture-font.[ch],
texture-atlas.[ch]).


Greeting :)

Sylvain.



Nicolas Rougier

unread,
Jan 1, 2012, 4:56:30 AM1/1/12
to freetype-gl

That's great news ! And it would be even greater if you can post your
notes and code, I'm pretty sure people will appreciate.
Does that mean you have an OpenGL ES only implementation ? That would
be a great addition to the demos.


Nicolas

sduclos

unread,
Jan 1, 2012, 8:09:17 AM1/1/12
to freet...@googlegroups.com
Hi,

> Does that mean you have an OpenGL ES only implementation ? That would
> be a great addition to the demos.

Yes, I'm using OpenGL ES 2.0 and EGL on Android native (ie no Java, only C).

And yes putting together a standalone demo is a great idea.

But I will need some time to build that so that it fit in your stuff


I the mean time

vector.c:158

if( self->capacity < size);
{
self->items = realloc( self->items, size * self->item_size );
self->capacity = size;
}

should be

if( self->capacity < size)
{
self->items = realloc( self->items, size * self->item_size );
self->capacity = size;
}

there is a ';' at the end of the 'if' that look suspicious :)

Thanks,

Sylvain.

Nicolas Rougier

unread,
Jan 2, 2012, 1:58:04 AM1/2/12
to freet...@googlegroups.com
>
> I the mean time
>
> vector.c:158
>
> if( self->capacity < size);
> {
> self->items = realloc( self->items, size * self->item_size );
> self->capacity = size;
> }
>
> should be
>
> if( self->capacity < size)
> {
> self->items = realloc( self->items, size * self->item_size );
> self->capacity = size;
> }
>
> there is a ';' at the end of the 'if' that look suspicious :)

Thanks, it has been corrected. That was really a tricky one to be found !

Happy new year.

Nicolas

sduclos

unread,
Jan 6, 2012, 2:01:36 PM1/6/12
to freet...@googlegroups.com
I have posted my stand-alone freetpe-gl-demo-android to Nicolas for review

here a Screenshot.png for those interested


Sylvain.

Screenshot.png

Bernd Paysan

unread,
Mar 19, 2013, 7:30:19 PM3/19/13
to freet...@googlegroups.com
Am Freitag, 6. Januar 2012 20:01:36 UTC+1 schrieb sduclos:
I have posted my stand-alone freetpe-gl-demo-android to Nicolas for review

here a  Screenshot.png for those interested

 Is there any pointer where I can download your Android modifications?

sduclos

unread,
Mar 20, 2013, 2:57:36 PM3/20/13
to freetype-gl
Hi,


Nicolas has the code. So I thought it will land on is site eventually.

All of demo-android.tar.gz is 8 meg because it depend on a bunch of libs compiled for android.

But the source code only of freetype-gl for android is 17K (in attachement).




Sylvain.




--
You received this message because you are subscribed to the Google Groups "freetype-gl" group.
To unsubscribe from this group and stop receiving emails from it, send an email to freetype-gl...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

freetype-gl_droid.tar.gz

Bernd Paysan

unread,
Mar 20, 2013, 3:34:15 PM3/20/13
to freet...@googlegroups.com, sduclos
Am Mittwoch, 20. März 2013, 14:57:36 schrieb sduclos:
> Hi,
>
>
> Nicolas has the code. So I thought it will land on is site eventually.
>
> All of demo-android.tar.gz is 8 meg because it depend on a bunch of libs
> compiled for android.

Yes, I don't need that (apart obviously from freetype2 itself - without,
freetype-gl is useless ;-).

> But the source code only of freetype-gl for android is 17K (in attachement).

Thanks!

--
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/
signature.asc

Nicolas Rougier

unread,
Mar 22, 2013, 5:58:01 AM3/22/13
to freet...@googlegroups.com, sduclos

Yep, sorry about the long delay.
With all the restructuration of the project, I need to find the best way to integrate your work since it won't compile on other platforms.

Maybe a variable in Makefile/CMakefile will do the trick, no ?



Nicolas
Reply all
Reply to author
Forward
0 new messages