Wednesday, October 9, 2013

[android-developers] Re: Show Glyph outside Unicode Range ? label:Android

I don't think that Android's typeface component or TextView allows switching to different variants. If your font does not have a mapping from that glyph to a Unicode code point then you probably won't be able to render it.

If you have a font editing application you could extract that glyph and assign it to an ordinary "1" :-/



On Wednesday, October 9, 2013 7:32:17 AM UTC-5, Ingo Klein wrote:
Hi guys,
i would like to show a Glyph (GlyphID 932) of a Font that i use in my app.
The Glyph isn't specified in the Unicode therefor is doesn't have and UnicodeID.
Its a special redrawn "1" inside this Font.
Under Photoshop you can acces it via "OpenType-> Format variants" (or sort of, i use the German Version)
and it will display the correct Character.
I also tried to copy it directly in the Source but only got a squared Questionmark.

Any ideas ?

Code below :

    Typeface tf = Typeface.createFromAsset(this.getActivity().getAssets(), "fonts/thesansextra.otf");      TextView tv = (TextView) view.findViewById(R.id.txt_sub);      tv.setText("1");      tv.getPaint().setAntiAlias(true);      tv.setTypeface(tf);




--
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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate