Git Product home page Git Product logo

Comments (7)

farzad321554 avatar farzad321554 commented on May 18, 2024

You're great Oliver
I'm waiting for Ver2.1
And I promise the first code on my lovely SSD1306 OLED will be:

u8g2.print("اولیور به ایران خوش آمدی"); //Means "Welcome to Iran Oliver" ;) ;)

from u8g2.

olikraus avatar olikraus commented on May 18, 2024

I have created several arabic fonts:
https://raw.githubusercontent.com/wiki/olikraus/u8g2/fntpic/u8g2_font_cu12_t_arabic.png
https://raw.githubusercontent.com/wiki/olikraus/u8g2/fntpic/u8g2_font_10x20_t_arabic.png
https://raw.githubusercontent.com/wiki/olikraus/u8g2/fntpic/u8g2_font_unifont_t_arabic.png

so you can choose between three fonts at the moment.

from u8g2.

olikraus avatar olikraus commented on May 18, 2024

looks ok, but i am not sure because of the writing direction. Kerning is not supported...

arabic

from u8g2.

farzad321554 avatar farzad321554 commented on May 18, 2024

Yes, the direction is right to left.
Is'nt there any hope for kerning?

from u8g2.

olikraus avatar olikraus commented on May 18, 2024

U8g2 fonts are derived from the BDF file format. To my knowledge, this BDF file format does not contain any kerning information. So u8g2 font calculation tool chain can not get and handle this information.

The only option what i could imagine, is that we add the kerning information as an extra table manually. Would this be an option?

from u8g2.

olikraus avatar olikraus commented on May 18, 2024

Currently i am thinking on the introduction of a kerning table, which has to be added manually.
Something like this:
uint16_t kerning_table[] =
{
code1, code2, kerning,
code1, code2, kerning,
code1, code2, kerning,
...
};
Probably you have to experiment a little bit and derive the kerning table manually. This mean, u8g2 project will not provide any kerning table (mainly because of the above reason, that the kerning is not there in the font sources)
Then there would be a function
u8g2.setKerningTable(kerning_table);

What do you think?

from u8g2.

olikraus avatar olikraus commented on May 18, 2024

afm files contain proper kerning, some fonts are mentioned here.
The kerning table could be derived from the atm files:
http://www.nsl.com/k/pdf/afm/

from u8g2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.