File: 04_use_system_unifont.patch

package info (click to toggle)
solvespace 3.0.rc2%2Brepack1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,136 kB
  • sloc: cpp: 121,426; ansic: 8,912; javascript: 1,919; sh: 113; xml: 44; makefile: 25
file content (37 lines) | stat: -rw-r--r-- 1,210 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Subject: Use Unifont from system
Forwarded: not-needed
From: Ryan Pavlik <ryan.pavlik@collabora.com>

Date: Tue, 19 Jan 2021 15:06:55 -0600


---
 res/CMakeLists.txt | 1 -
 src/resource.cpp   | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/res/CMakeLists.txt b/res/CMakeLists.txt
index d893f93..85b6e49 100644
--- a/res/CMakeLists.txt
+++ b/res/CMakeLists.txt
@@ -259,7 +259,6 @@ add_resources(
     locales/uk_UA.po
     locales/ru_RU.po
     locales/zh_CN.po
-    fonts/unifont.hex.gz
     fonts/private/0-check-false.png
     fonts/private/1-check-true.png
     fonts/private/2-radio-false.png
diff --git a/src/resource.cpp b/src/resource.cpp
index 7b19081..e8a51bb 100644
--- a/src/resource.cpp
+++ b/src/resource.cpp
@@ -665,7 +665,7 @@ size_t BitmapFont::GetWidth(const std::string &str) {
 }
 
 BitmapFont BitmapFont::Create() {
-    BitmapFont Font = BitmapFont::From(LoadStringFromGzip("fonts/unifont.hex.gz"));
+    BitmapFont Font = BitmapFont::From(LoadString("fonts/unifont.hex"));
     // Unifont doesn't have a glyph for U+0020.
     Font.AddGlyph(0x0020, Pixmap::Create(Pixmap::Format::RGB, 8, 16));
     Font.AddGlyph(0xE000, LoadPng("fonts/private/0-check-false.png"));