Comments (8)
A font definition can maximally contain 255 chars. So we can display the extended ascii set of characters. Arabic letters are not in this set so we can't display them.
One workaround for this is to generate a font definition that consists only of arabic letters and use a little helper function to shift the arabic letters into chars in the 0..254 range. The only caveat would be that you could not mix Arabic and non Arabic letters in the same string.
[Edit]
I made a little demo here I have no idea if this is working correctly, I don't know any arabic and have no idea how it should look on the display. There might be some issues with reading direction because arabic is read from right to left instead of left to right. Take it as a starting point.
from esp8266-oled-ssd1306.
thanks i will test it and update you , and you are correct Arabic is RTL language.
you also can test it with this Arabic Hello World
is أهلا بالعالم
and it should be appearing the same in that comment.
from esp8266-oled-ssd1306.
I updated the font to be 16px big and added a reverse function to correctly print the string. I updated the demo here.
from esp8266-oled-ssd1306.
thanks for the Demo , i test the last Demo you provided but as i told you the letters comes aparts and not continuous in words.
Arabic is little bit complicated .
from esp8266-oled-ssd1306.
I noticed that but I can't to much about it because I don't understand the rules underpinning the arabic language. I have no idea if there is a simple rule set when to change UTF8 chars on which combination etc.
I am afraid you might be on your own here. If you have any technical questions, feel free to ask. I will try to help as good as I can.
from esp8266-oled-ssd1306.
thanks a lot for your time and effort,i will keep searching if i found a solution i will let you know.
from esp8266-oled-ssd1306.
Sorry to reopen such an old post but... by chance I found a sketch for Arduino to write Persian on an SSD1306 OLED display. As far as I know Persian uses the arabic alphabet so probably it is also useful for writting Arabic. Besides I have a clue, I don't really know who generated the code, but it certainly wasn't me. The original code didn't work properly but I liked it so much that I took the challenge of making it work. Therefore, my only contribution has been debugging it a little wee. Four cases are considered to decide how a letter is written, depending on the position of the letter: isolated, at the beginning, in the middle or tailing the word. I found it a magnificent piece of software. Anyone can try both codes at:
Original code: https://wokwi.com/projects/372442890656329729
Debugged (and working) code: https://wokwi.com/projects/399060267330575361
Best regards.
from esp8266-oled-ssd1306.
Clues led me to https://github.com/idreamsi/arduino-persian-reshaper as the maker of the sketch. Or am I wrong?
from esp8266-oled-ssd1306.
Related Issues (20)
- String in negative HOT 2
- I2C_ONE / I2C_TWO are not declared but the HW_I2C enum is?
- display.flipScreenVertically(); does not rotate or flip display
- drawStringMaxWidth doesn't return 0 even though text fits
- How change color text? HOT 1
- The bitmap drawing is not compatible with the img2cpp websites. The data needs to be fliped every 8bits. HOT 5
- display.init() crashes serial on ESP32-C3-01M HOT 1
- Unused variable warning on ESP8266 HOT 3
- SSD1306Wire.h, line 145 causes compilation error 'byte' is ambiguous HOT 1
- rotate 90
- SSD1306TwoScreenDemo ESP32 doesn't work HOT 2
- Reset signal HOT 2
- No way to clear logBuffer HOT 1
- Speed, lots of it!
- Huge font size - possible? HOT 6
- Small tweaks allows running on ATMega2560 HOT 1
- Support for extended ASCII for font 3x5 and font 5x5
- My display has gone blank since upgrading to 4.6.0 HOT 4
- I2C Error with 4.6.0 upgrade HOT 4
- Yurii
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 esp8266-oled-ssd1306.