のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

AndroidCharacter

int eaw = AndroidCharacter.getEastAsianWidth(code);
switch(eaw)
{
case AndroidCharacter.EAST_ASIAN_WIDTH_NEUTRAL:
case AndroidCharacter.EAST_ASIAN_WIDTH_FULL_WIDTH:
case AndroidCharacter.EAST_ASIAN_WIDTH_HALF_WIDTH:
case AndroidCharacter.EAST_ASIAN_WIDTH_AMBIGUOUS:
case AndroidCharacter.EAST_ASIAN_WIDTH_NARROW:
    canvas.drawText(text, 0, end, (float)sx, (float)sy, mPaint);
    break;
case AndroidCharacter.EAST_ASIAN_WIDTH_WIDE:
default:
    Log.d("DroidView", "code=["+ Integer.toHexString(code)
        +"] width=[" + width + "] height=["+height+"] EAW=["+eaw+"]");
    break;
}