-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for international fonts, and rendering UTF8 characters that c…
…ome from iOS direct in the messages app
- Loading branch information
1 parent
ee0b0f2
commit 591c1f8
Showing
28 changed files
with
264 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.01: New App! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Fonts (all languages) | ||
|
||
This library provides an international font that can be used to display messages. | ||
|
||
The font is the 16px high [GNU Unifont](https://unifoundry.com/unifont/index.html). | ||
All characters from Unicode codepoint 32 up until codepoint 65535 (U+FFFF) are included here, | ||
which should be enough for most languages. | ||
|
||
**The font is 2MB and takes a while to upload** - if you don't require all the languages | ||
it provides, consider installing another Font library like [extended fonts](https://banglejs.com/apps/?id=fontsext) | ||
that contains just the characters you need instead. | ||
|
||
## Usage | ||
|
||
See [the BangleApps README file](https://github.com/espruino/BangleApps/blob/master/README.md#api-reference) | ||
for more information on fonts. | ||
|
||
|
||
## Recreating font.pbf | ||
|
||
* Go to `bin` directory | ||
* Run `./font_creator.js "All" ../apps/fontall/font.pbf` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
exports.getFont = (options) => { | ||
return "Intl"; // placeholder for now - see https://github.com/espruino/BangleApps/issues/3109 | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ "id": "fontall", | ||
"name": "Fonts (all languages)", | ||
"version":"0.01", | ||
"description": "Installs a font containing over 50,000 Unifont characters for Chinese, Japanese, Korean, Russian, and more. **Requires 2MB storage**", | ||
"icon": "app.png", | ||
"tags": "font", | ||
"type": "module", | ||
"provides_modules" : ["font"], | ||
"supports" : ["BANGLEJS2"], | ||
"readme": "README.md", | ||
"storage": [ | ||
{"name":"font","url":"lib.js"}, | ||
{"name":"fontall.boot.js","url":"boot.js"}, | ||
{"name":"fontall.pbf","url":"font.pbf"} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.01: New App! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Fonts (extended) | ||
|
||
This library provides an international font that can be used to display messages. | ||
|
||
The font is the 16px high [GNU Unifont](https://unifoundry.com/unifont/index.html). | ||
All characters from Unicode codepoint 32 up until codepoint 1103 (U+044F) are included here, | ||
which should be enough for [around 90% of languages](https://arxiv.org/pdf/1801.07779.pdf#page=5) | ||
but **not** Chinese/Japanese/Korean. | ||
|
||
The font is 20kb so is far more sensible than the [2MB all regions](https://banglejs.com/apps/?id=fontsall) font | ||
if you don't require non-latin languages. | ||
|
||
|
||
https://arxiv.org/pdf/1801.07779.pdf#page=5 | ||
|
||
## Usage | ||
|
||
See [the BangleApps README file](https://github.com/espruino/BangleApps/blob/master/README.md#api-reference) | ||
for more information on fonts. | ||
|
||
|
||
## Recreating font.pbf | ||
|
||
* Go to `bin` directory | ||
* Run `./font_creator.js "Extended" ../apps/fontext/font.pbf` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
exports.getFont = (options) => { | ||
return "Intl"; // placeholder for now - see https://github.com/espruino/BangleApps/issues/3109 | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ "id": "fontext", | ||
"name": "Fonts (150+ languages)", | ||
"version":"0.01", | ||
"description": "Installs a font containing 1000 Unifont characters, which should handle the majority of non-Chinese/Japanese/Korean languages (only 20kb)", | ||
"icon": "app.png", | ||
"tags": "font", | ||
"type": "module", | ||
"provides_modules" : ["font"], | ||
"supports" : ["BANGLEJS2"], | ||
"readme": "README.md", | ||
"storage": [ | ||
{"name":"font","url":"lib.js"}, | ||
{"name":"fontext.boot.js","url":"boot.js"}, | ||
{"name":"fontext.pbf","url":"font.pbf"} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.