Fix 4x8 fonts on API level 4+
(Use a runtime API level check to choose whether to load the nodpi version.)
This commit is contained in:
parent
f6693d52ef
commit
c3d85685a8
Before Width: | Height: | Size: 974 B After Width: | Height: | Size: 974 B |
@ -1110,8 +1110,9 @@ class Bitmap4x8FontRenderer extends BaseTextRenderer {
|
||||
int forePaintIndex, int forePaintColor,
|
||||
int backPaintIndex, int backPaintColor) {
|
||||
super(forePaintIndex, forePaintColor, backPaintIndex, backPaintColor);
|
||||
mFont = BitmapFactory.decodeResource(resources,
|
||||
R.drawable.atari_small);
|
||||
int fontResource = AndroidCompat.SDK <= 3 ? R.drawable.atari_small
|
||||
: R.drawable.atari_small_nodpi;
|
||||
mFont = BitmapFactory.decodeResource(resources,fontResource);
|
||||
mPaint = new Paint();
|
||||
mPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user