Skip to content

Commit 46a04a2

Browse files
committed
Switch to Open Sans as OBS font
1 parent 481c931 commit 46a04a2

File tree

14 files changed

+1892
-1009
lines changed

14 files changed

+1892
-1009
lines changed

src/displays.h

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,21 @@
3434
#include "sensor.h"
3535

3636

37-
extern const uint8_t Ubuntu_Regular_Plain_8[];
38-
extern const uint8_t ArialMT_Plain_10[]; // :(
39-
extern const uint8_t Ubuntu_Regular_Plain_10[];
40-
extern const uint8_t Ubuntu_Regular_Plain_22[];
41-
extern const uint8_t Ubuntu_Regular_Plain_34[];
42-
extern const uint8_t Ubuntu_Regular_Plain_54[];
37+
extern const uint8_t Open_Sans_Regular_Plain_8[];
38+
//// this font is part of OLEDDisplay::OLEDDisplay :/
39+
//extern const uint8_t ArialMT_Plain_10[]; // :(
40+
extern const uint8_t Open_Sans_Regular_Plain_10[];
41+
extern const uint8_t Open_Sans_Regular_Plain_20[];
42+
extern const uint8_t Open_Sans_Regular_Plain_34[];
43+
extern const uint8_t Open_Sans_Regular_Plain_50[];
4344
extern const uint8_t BatterieLogo1[];
4445
extern const uint8_t TempLogo[];
4546

46-
#define TINY_FONT Ubuntu_Regular_Plain_8
47-
// this font is part of OLEDDisplay::OLEDDisplay :/
48-
// #define SMALL_FONT ArialMT_Plain_10
49-
#define SMALL_FONT Ubuntu_Regular_Plain_10
50-
#define MEDIUM_FONT Ubuntu_Regular_Plain_22
51-
#define LARGE_FONT Ubuntu_Regular_Plain_34
52-
#define HUGE_FONT Ubuntu_Regular_Plain_54
47+
#define TINY_FONT Open_Sans_Regular_Plain_8
48+
#define SMALL_FONT Open_Sans_Regular_Plain_10
49+
#define MEDIUM_FONT Open_Sans_Regular_Plain_20
50+
#define LARGE_FONT Open_Sans_Regular_Plain_34
51+
#define HUGE_FONT Open_Sans_Regular_Plain_50
5352

5453
// Forward declare classes to build (because there is a cyclic dependency between sensor.h and displays.h)
5554
class HCSR04SensorInfo;

src/fonts/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ is currently open. (https://github.com/arcao/esp8266-oled-ssd1306-font-creator/p
1414

1515
## Generating
1616

17-
1. Download via from https://fonts.google.com/specimen/Ubuntu
18-
1. `fontcreator -s 8 Ubuntu-Regular.ttf -c iso-8859-15 -o ubuntu8.h -a " 0123456789.%°C"`
19-
1. `fontcreator -s 10 Ubuntu-Regular.ttf -c iso-8859-15 -o ubuntu10.h`
20-
1. `fontcreator -s 22 Ubuntu-Regular.ttf -c iso-8859-15 -o ubuntu22.h -a "0123456789-cm|kVs"`
21-
1. `fontcreator -s 34 Ubuntu-Regular.ttf -c iso-8859-15 -o ubuntu34.h -a "0123456789-cm|kVs" -y 3`
22-
1. `fontcreator -s 54 Ubuntu-Regular.ttf -c iso-8859-15 -o ubuntu58.h -a "0123456789" -y 5`
23-
17+
1. Download via from https://fonts.google.com/specimen/Open+Sans
18+
1. `fontcreator -s 8 -c iso-8859-15 -y 2 -o opensans8.h OpenSans-Regular.ttf`
19+
1. `fontcreator -s 10 -c iso-8859-15 -y 2 -o opensans10.h OpenSans-Regular.ttf`
20+
1. `fontcreator -s 20 -c iso-8859-15 -y 4 -o opensans20.h OpenSans-Regular.ttf`
21+
1. `fontcreator -s 34 -c iso-8859-15 -y 7 -o opensans34.h OpenSans-Regular.ttf`
22+
1. `fontcreator -s 50 -c iso-8859-15 -y 10 -o opensans50.h OpenSans-Regular.ttf -a "0123456789"`
2423

src/fonts/UFL.txt

Lines changed: 0 additions & 96 deletions
This file was deleted.

src/fonts/fonts.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
#ifndef OPENBIKESENSORFIRMWARE_FONTS_H
2525
#define OPENBIKESENSORFIRMWARE_FONTS_H
2626

27-
#include "ubuntu8.h"
28-
#include "ubuntu10.h"
29-
#include "ubuntu22.h"
30-
#include "ubuntu34.h"
31-
#include "ubuntu54.h"
27+
#include "opensans8.h"
28+
#include "opensans10.h"
29+
#include "opensans20.h"
30+
#include "opensans34.h"
31+
#include "opensans50.h"
3232

3333
#include "logos.h"
3434

0 commit comments

Comments
 (0)