You may be able to just stick a TextView or even a sophisticated layout 
right over the OpenGL surface.  This would save you the hassle of writing 
code to convert to textures.  It would be like this:

*setContentView(yourGLSurfaceView);*
*addContentView(yourTextOverlayView);*

Thanks.


On Sunday, May 19, 2013 12:55:23 PM UTC-5, latimerius wrote:
>
> Hello,
>
> I'm looking into localising an OpenGL app into several languages.  I'm not 
> too worried about short strings like button labels, however the welcome 
> screen contains a paragraph or two of text and the tutorial has a couple of 
> 2-3 lines text strings.  Currently, they are pre-rendered and distributed 
> as PNGs but ideally, they should be rendered on-the-fly to save texture 
> space and avoid scaled text.
>
> To achieve that, it seems necessary to handle line breaking properly. 
>  However, I couldn't find an API in Android to help with that.  I'm aware 
> of Paint.breakText() but it seems too primitive for the task - it actually 
> doesn't seem to handle proper line breaking at all.  For Western languages, 
> it should be mostly fine just to back off to the first space from what 
> breakText() returns and break the line there.  The problem is how to deal 
> with Asian languages (Chinese, Japanese and Korean - also Thai would be 
> nice), and later on with RTL languages, too.
>
> Some googling gave me the impression that in general, people like me 
> shouldn't try to tackle the problem themselves - it's too complex and 
> belongs into an operating system/application framework anyway.
>
> Is there something in Android platform to help turn a paragraph of text 
> into a decent PNG of specified dimensions?
>
> Thanks in advance!
>
>  

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to