Comments (13)
Great suggestion @boricj. We could indeed lower the pixel depth (bpp) of the mask. 4-bits might be a good idea given that text rendering is a hot path of code execution. Definitely something worth trying though.
And I think @zyga is right too, we need to split this issue in smaller sub-problems.
What do you guys think of:
- Add a way to pick the set of localization built-in at compile-time.
- Add an actual Polish translation
- Consider adding more glyphs. Maybe make it play well with 1 too (i.e. don't embed glyphs that won't be used).
from epsilon.
The glyphs are currently stored as uncompressed 8 bits per pixel masks.
Experiments with GIMP suggests they can be acceptably downsampled down to 3 bits per pixel. If keeping bit twiddling to a minimum is desired, a reasonable compromise would be 4 bits per pixels combined with a 4-bit variant of PackBits. You could probably quadruple the number of glyphs for the same Flash space usage with no practical performance loss.
from epsilon.
Hi @zyga, thanks a lot, we really appreciate it! Currently we only support a very small charset: essentially a-z, A-Z, 0-9.
Unfortunately I don't speak Polish so I don't know if it's possible to use this restricted charset.
The problem with a larger charset is that it takes adding extra glyphs quickly eat up a lot of memory…
from epsilon.
Polish uses extended Latin characters, I had to added (AFAIR, again other laptop) 18 glyphs for both lower and upper case characters. Detailed analysis of my translation might uncover redundant positions that are not used.
I understand the memory issue (AFAIK the device has 1MB flash storage) but I think it's possible to either just fit it (I didn't try) or offer build variants. Lastly Polish can be "reduced" to just ASCII at some small eye sore so if anything we might land that variant.
BTW: I tried to open the font files that are in the project but those caused gnome font viewer to crash. How are you working with them?
The set of non-ASCII characters used by Polish is: ą, ę, ś, ć, ń, ź, ż, ł, ó
from epsilon.
Arguably those could also (perhaps) be handled by composing Unicode characters. I could also try to patch the render functions to compress the fonts so that less ROM is necessary for them.
from epsilon.
To save space on strings/translations in general, I suppose additional languages (other than English and French?) could be downloaded separately? Or rather it would be an OS with only English+X, where X is the language chosen by the user on the OS update site.
This would probably save quite a lot of space, allowing for example for a much larger ASCII range (having the extended ascii range from 128 to 154, for instance, would be nice)
from epsilon.
I was also thinking about compressing the strings. Given the amount of text we could do that on the fly (though probably compressing the fonts would yield more savings). Since I just ordered my device and I didn't try it can someone tell me how much space remains with the current master?
from epsilon.
Here are a couple things to know about text rendering:
- Glyph rasterization is done at build time. We embed bitmap version for every single glyph. This tends to eat up quite a lot of flash rather quickly.
- Text rendering can easily become a bottleneck in terms of display performances. Special attention should be paid to performance when dealing with text rendering, and testing should really be done on the device.
- There's 1MB of flash space on the device. Current firmware takes half of that (513k to be precise). Clearly it's definitely possible to embed a lot of extra characters but we thought it was better to save flash space for other features.
Maybe the best solution could be to use a tiered system? It would unfold as follow:
- Have a firmware flashed in factory with the "k" most-frequently used languages.
- Then have a custom firmware generated when the end user updates his/her device, specifically with his/her own language added in.
from epsilon.
Let's decouple this into two problems:
- landing the extra language support without the use of non-ascii characters
- exploring adding the extra 18 characters, perhaps with some of the other enhancements proposed above
from epsilon.
Hi @zyga ! Once #174 will have landed (hopefully sooner rather than later) you'll be able to easily contribute a Polish translation :)
from epsilon.
Thank you for letting me know :) I was just using the device without remembering to contribute back :)
from epsilon.
Oh, it's merged now. I can propose my translation :)
from epsilon.
I have made an Swedish translation also, should we make some kind of lang pack for general approach?
from epsilon.
Related Issues (20)
- Deeplink to NumWorks simulator in choosen language HOT 2
- DEBERIAN MEJORAR LO DE QUIMICA, TAMBIEN COLOCAR MAS FORMULAS DE DETERMINANTES HOT 1
- Phasor notation HOT 2
- require a more recent authetified kernel to be executed HOT 1
- Updates to the English User Manual
- 3D Graphing mode HOT 2
- Tableau de valeur et valeur exactes / Fraction and exact values error HOT 1
- Update the guide "Installing the SDK"
- Update the guide "Installing the SDK" HOT 10
- Save data module HOT 1
- Add a password to enter into your Numeworks
- Add a password to enter into your Numeworks
- Lack of decimal places in sequences app leading to incorrect solutions to exam questions. HOT 1
- Building simulator on W10 HOT 4
- Affichage graphique de fonction non définies.
- Add Half Life field to Elements app HOT 1
- Number the options list so we can jump to it without scrolling HOT 1
- Béta 22.2 - But no name HOT 4
- add multiple tangent
- In ion/src/device/ion-core is not found as a repo HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from epsilon.