Skip to content

Commit 9db07fd

Browse files
committed
Correction Updates for publishing
1 parent ee10e5a commit 9db07fd

File tree

4 files changed

+100
-4
lines changed

4 files changed

+100
-4
lines changed

README.md

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,72 @@
11
# ExtendedChars
2-
An extension library for Adafruit GFX that supports more characters
2+
3+
An extension library for Adafruit GFX that supports more characters.
4+
5+
## Description
6+
7+
This library provides functions to handle extended characters like German umlauts for use with the Adafruit GFX library. It includes support for two fonts: Extended_ClassicFont7pt and Extended_FreeSans9pt7b.
8+
9+
## Supported Characters
10+
11+
Currently, the library supports the following German umlauts and special characters:
12+
- Ä (U+00C4)
13+
- Ö (U+00D6)
14+
- Ü (U+00DC)
15+
- ä (U+00E4)
16+
- ö (U+00F6)
17+
- ü (U+00FC)
18+
- ß (U+00DF)
19+
20+
## Installation
21+
22+
### Arduino
23+
24+
1. Download the library as a ZIP file and extract it.
25+
2. Move the extracted folder to your Arduino libraries directory (usually `Documents/Arduino/libraries`).
26+
3. Restart the Arduino IDE.
27+
28+
### PlatformIO
29+
30+
1. Add the following to your `platformio.ini` file:
31+
```ini
32+
lib_deps =
33+
https://github.com/dpoettler/ExtendedChars.git
34+
```
35+
36+
## Usage
37+
38+
### Example
39+
40+
```cpp
41+
#include <Adafruit_GFX.h>
42+
#include <Adafruit_SSD1306.h>
43+
#include "ExtendedChars.h"
44+
#include "Extended_ClassicFont7pt.h"
45+
#include "Extended_FreeSans9pt7b.h"
46+
47+
Adafruit_SSD1306 display(128, 64, &Wire);
48+
49+
void setup() {
50+
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
51+
display.clearDisplay();
52+
53+
// Set font
54+
display.setFont(&Extended_ClassicFont7pt);
55+
56+
// Print text with extended characters
57+
display.setCursor(0, 20);
58+
display.print(ExtendedChars::extendChars("Hällo Wörld"));
59+
60+
display.display();
61+
}
62+
63+
void loop() {
64+
// Nothing to do here
65+
}
66+
```
67+
## API
68+
String ExtendedChars::extendChars(const String &str)
69+
Converts a UTF-8 string to a format that can be displayed using the Adafruit GFX library with extended characters.
70+
71+
## License
72+
This library is licensed under the GPL v3 License.

examples/HelloWorldWithUtf8.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include <Adafruit_GFX.h>
2+
#include <Adafruit_SSD1306.h>
3+
#include <ExtendedChars.h>
4+
#include <Fonts/Extended_ClassicFont7pt.h>
5+
#include <Fonts/Extended_FreeSans9pt7b.h>
6+
7+
Adafruit_SSD1306 display(128, 64, &Wire);
8+
9+
void setup() {
10+
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
11+
display.clearDisplay();
12+
13+
// Set font
14+
display.setFont(&Extended_ClassicFont7pt);
15+
16+
// Print text with extended characters
17+
display.setCursor(0, 20);
18+
display.print(ExtendedChars::extendChars("Hällo Wörld"));
19+
20+
display.display();
21+
}
22+
23+
void loop() {
24+
// Nothing to do here
25+
}

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ExtendedChars",
3-
"version": "0.1",
3+
"version": "0.1.1",
44
"authors": [
55
{
66
"name": "David Pöttler",

library.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name=ExtendedChars
2-
version=0.1
2+
version=0.1.1
33
author=David Pöttler
44
maintainer=david.e.poettler@gmail.com
55
sentence=ExtendedChars is an extension library for the Adafruit GFX library adding support for UTF8 characters.
66
paragraph=ExtendedChars is an extension library for the Adafruit GFX library adding support for UTF8 characters. It is based on the Adafruit GFX library and extends it by adding support for UTF8 characters. The library is designed to be used with Adafruit displays and is compatible with the Adafruit GFX library. The library is designed to be used with Adafruit displays and is compatible with the Adafruit GFX library.
77
category=Display
88
license=GPL v3
99
url=https://github.com/dpoettler/ExtendedChars
10-
depends=Adafruit GFX Library, Adafruit BusIO
10+
depends=Adafruit GFX Library, Adafruit BusIO
11+
architectures=*

0 commit comments

Comments
 (0)