Skip to content

Commit 094f049

Browse files
authored
Merge pull request #1432 from NickeZ/nickez/ttf2ugui-compat
fonts: Make fonts closer to original
2 parents 89d7550 + bb4c18b commit 094f049

22 files changed

+24
-20
lines changed

src/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ set(FIRMWARE-U2F-SOURCES ${FIRMWARE-U2F-SOURCES} PARENT_SCOPE)
179179

180180
set(INCLUDES
181181
${CMAKE_SOURCE_DIR}/src
182+
${CMAKE_SOURCE_DIR}/src/ui/ugui
182183
${CMAKE_SOURCE_DIR}/src/platform
183184
${CMAKE_SOURCE_DIR}/src/qtouch
184185
${CMAKE_SOURCE_DIR}/src/usb/class
@@ -538,5 +539,7 @@ if(CMAKE_CROSSCOMPILING)
538539
if(NOT CMAKE_BUILD_TYPE STREQUAL "DEBUG")
539540
target_compile_options(${name}.elf PRIVATE "-Werror")
540541
endif()
542+
543+
target_link_libraries(${name}.elf PRIVATE -Wl,--print-memory-usage)
541544
endforeach()
542545
endif()

src/rust/bitbox02-sys/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ pub fn main() -> Result<(), &'static str> {
189189
let mut includes = vec![
190190
// $INCLUDES
191191
"../..",
192+
"../../ui/ugui",
192193
"../../platform",
193194
"../../qtouch",
194195
"../../usb/class",

src/ui/fonts/font_a_11X10.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// --bpp 1
44
// For copyright, see original font file.
55

6-
#include <ui/ugui/ugui.h>
6+
#include <ugui.h>
77

88
static UG_FONT_DATA unsigned char fontBits_font_a_11X10[95][20] = {
99
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, // 0x20 ' '

src/ui/fonts/font_a_11X10.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include <ui/ugui/ugui.h>
15+
#include <ugui.h>
1616

1717
extern const UG_FONT font_font_a_11X10;

src/ui/fonts/font_a_11X12.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// --bpp 1
55
// For copyright, see original font file.
66

7-
#include <ui/ugui/ugui.h>
7+
#include <ugui.h>
88

99
static UG_FONT_DATA unsigned char fontBits_font_a_11X12[95][24] = {
1010
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // 0x20 ' '

src/ui/fonts/font_a_11X12.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include <ui/ugui/ugui.h>
15+
#include <ugui.h>
1616

1717
extern const UG_FONT font_font_a_11X12;

src/ui/fonts/font_a_13X14.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// --bpp 1
55
// For copyright, see original font file.
66

7-
#include <ui/ugui/ugui.h>
7+
#include <ugui.h>
88

99
static UG_FONT_DATA unsigned char fontBits_font_a_13X14[95][28] = {
1010
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, // 0x20 ' '

src/ui/fonts/font_a_13X14.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include <ui/ugui/ugui.h>
15+
#include <ugui.h>
1616

1717
extern const UG_FONT font_font_a_13X14;

src/ui/fonts/font_a_15X16.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// --bpp 1
55
// For copyright, see original font file.
66

7-
#include <ui/ugui/ugui.h>
7+
#include <ugui.h>
88

99
static UG_FONT_DATA unsigned char fontBits_font_a_15X16[95][32] = {
1010
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // 0x20 ' '

src/ui/fonts/font_a_15X16.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include <ui/ugui/ugui.h>
15+
#include <ugui.h>
1616

1717
extern const UG_FONT font_font_a_15X16;

src/ui/fonts/font_a_17X18.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// --bpp 1
55
// For copyright, see original font file.
66

7-
#include <ui/ugui/ugui.h>
7+
#include <ugui.h>
88

99
static UG_FONT_DATA unsigned char fontBits_font_a_17X18[95][54] = {
1010
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, // 0x20 ' '

src/ui/fonts/font_a_17X18.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include <ui/ugui/ugui.h>
15+
#include <ugui.h>
1616

1717
extern const UG_FONT font_font_a_17X18;

src/ui/fonts/font_a_9X9.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// --bpp 1
55
// For copyright, see original font file.
66

7-
#include <ui/ugui/ugui.h>
7+
#include <ugui.h>
88

99
static UG_FONT_DATA unsigned char fontBits_font_a_9X9[95][18] = {
1010
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, // 0x20 ' '

src/ui/fonts/font_a_9X9.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include <ui/ugui/ugui.h>
15+
#include <ugui.h>
1616

1717
extern const UG_FONT font_font_a_9X9;

src/ui/fonts/monogram_5X9.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// --bpp 1
44
// For copyright, see original font file.
55

6-
#include <ui/ugui/ugui.h>
6+
#include <ugui.h>
77

88
static UG_FONT_DATA unsigned char fontBits_monogram_5X9[95][9] = {
99
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, // 0x20 ' '

src/ui/fonts/monogram_5X9.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#include <ui/ugui/ugui.h>
1+
#include <ugui.h>
22

33
extern const UG_FONT font_monogram_5X9;

src/ui/fonts/password_11X12.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This is a copy of font_a_11X12.c with a modified space character
22

3-
#include <ui/ugui/ugui.h>
3+
#include <ugui.h>
44

55
static UG_FONT_DATA unsigned char fontBits_password_11X12[95][24] = {
66
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x41, 0x00, 0x41, 0x00, 0x7F, 0x00, 0x00, 0x00 }, // 0x20 (0x2423) '#'

src/ui/fonts/password_11X12.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include <ui/ugui/ugui.h>
15+
#include <ugui.h>
1616

1717
extern const UG_FONT font_password_11X12;

src/ui/fonts/password_9X9.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This is a copy of font_a_9X9.c with a modified space character
22

3-
#include <ui/ugui/ugui.h>
3+
#include <ugui.h>
44

55
static UG_FONT_DATA unsigned char fontBits_password_9X9[95][18] = {
66
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x00,0x22,0x00,0x3E,0x00 }, // 0x20 (0x2423) '#'

src/ui/fonts/password_9X9.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#include <ui/ugui/ugui.h>
1+
#include <ugui.h>
22

33
extern const UG_FONT font_password_9X9;

src/ui/ugui/ugui.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ typedef struct {
6767
UG_U8 *widths;
6868
} UG_FONT;
6969

70-
#define UG_FONT_DATA
70+
#define UG_FONT_DATA const
7171

7272
/* -------------------------------------------------------------------------------- */
7373
/* -- µGUI CORE STRUCTURE -- */

tools/ttf2ugui

0 commit comments

Comments
 (0)