Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MutableTextの文字コード範囲を32~159にしてみては? #233

Open
t-maru-123 opened this issue Nov 9, 2013 · 0 comments
Open

Comments

@t-maru-123
Copy link

お世話になってます。

MutableTextを使って、画面に文字を表示していますが、デフォルト文字以外にも、0x80以降のフォント画像領域に℃や±など独自のフォントを描いて、ui.enchant.jsの540行目付近を以下のような改造をして使用しています。

<変更前>
if (charCode >= 32 && charCode <= 127) {
charPos = charCode - 32;
} else {
charPos = 0;
}

<変更後>
if (charCode >= 32 && charCode <= 159) {
charPos = charCode - 32;
} else {
charPos = 0;
}

せっかく、標準添付のフォント画像で0x80以降を空けているなら、ソースコードも表示するコードの範囲を広げてみてはどうでしょうか?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant