Add 04_use_system_unifont.patch, update d/control, d/solvespace.links to use system...
authorRyan Pavlik <ryan.pavlik@collabora.com>
Tue, 19 Jan 2021 21:11:43 +0000 (15:11 -0600)
committerRyan Pavlik <ryan.pavlik@collabora.com>
Thu, 21 Jan 2021 15:58:29 +0000 (09:58 -0600)
debian/control
debian/patches/04_use_system_unifont.patch [new file with mode: 0644]
debian/patches/series
debian/solvespace.links

index b61d8070d9ae5c9c20547dc48865cf04b1066843..b2d32a23400473ae5a826faba9d1044e0a9e0aad 100644 (file)
@@ -30,7 +30,8 @@ Architecture: any
 Multi-Arch: foreign
 Depends: ${misc:Depends},
          ${shlibs:Depends},
-         libjs-three
+         libjs-three,
+         unifont
 Description: Parametric 2d/3d CAD
  SolveSpace is a parametric 2d/3d CAD program. Applications include:
  .
diff --git a/debian/patches/04_use_system_unifont.patch b/debian/patches/04_use_system_unifont.patch
new file mode 100644 (file)
index 0000000..701ef32
--- /dev/null
@@ -0,0 +1,34 @@
+From: Ryan Pavlik <ryan.pavlik@collabora.com>
+Date: Tue, 19 Jan 2021 15:06:55 -0600
+Subject: Use Unifont from system
+
+---
+ 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"));
index 8ef2061cd414e1fc3dc55dbe72637ef6e7b3ccd5..9c8db6b56ee34ab5e8bd31f89ee4105c2fc7ebfb 100644 (file)
@@ -1,5 +1,6 @@
 01_RemoveGitHash.patch
 02_add_debian_pkg_version.patch
 03_use_system_threejs.patch
+04_use_system_unifont.patch
 
 10_mimalloc_restrict_cpu_yield.patch
index 249f9885d3740c07d3260e9cd2fb208e3c92ceb9..1b4d5d66e8f33e6777e8efed51954eb81a4371db 100644 (file)
@@ -1 +1,2 @@
 usr/share/javascript/three/three.js usr/share/solvespace/threejs/three.js
+usr/share/unifont/unifont.hex usr/share/solvespace/fonts/unifont.hex