1

My customized ttf font file don't work on android 2.2

view story
linux-howto

http://stackoverflow.com – Paint paint = new Paint(); paint.setColor(Color.WHITE); paint.setTextSize(fontSize); paint.setAntiAlias(true); Typeface t = Typeface.createFromAsset(context.getAssets(), name) paint.setTypeface(t); FontMetricsInt fm = paint.getFontMetricsInt(); if (fm.bottom-fm.top <= 0) { Log.v("Cocos2dxBitmap", "invalid font metrics "+fm.bottom+", "+fm.top); return; } This code failed on android 2.2, works on any version above, i don't test it with lower version. I don't find any information relate to this, i guess it has something to do with my ttf file format. Hope someone can enl (HowTos)