]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Feat: adds fontconfig subsystem
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 18 Feb 2022 12:48:09 +0000 (09:48 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 18 Feb 2022 12:48:09 +0000 (09:48 -0300)
manifests/subsystem/fontconfig.pp [new file with mode: 0644]
manifests/subsystem/fontconfig/bitmaps.pp [new file with mode: 0644]

diff --git a/manifests/subsystem/fontconfig.pp b/manifests/subsystem/fontconfig.pp
new file mode 100644 (file)
index 0000000..8704387
--- /dev/null
@@ -0,0 +1,11 @@
+class nodo::subsystem::fontconfig {
+  package { 'fontconfig':
+    ensure => present,
+  }
+
+  exec { 'fontconfig-reconfigure':
+    command     => 'dpkg-reconfigure fontconfig',
+    refreshonly => true,
+    user        => 'root',
+  }
+}
diff --git a/manifests/subsystem/fontconfig/bitmaps.pp b/manifests/subsystem/fontconfig/bitmaps.pp
new file mode 100644 (file)
index 0000000..56df258
--- /dev/null
@@ -0,0 +1,26 @@
+#
+# Enable bitmap fonts, fixing some rendering issues with terminus and other fonts.
+#
+# https://unix.stackexchange.com/a/118665
+# https://www.pixelbeat.org/docs/fc_fixed.html
+# https://powerline.readthedocs.io/en/master/troubleshooting/linux.html
+#
+class nodo::subsystem::fontconfig::bitmaps inherits nodo::subsystem::fontconfig {
+
+  file { '/etc/fonts/conf.d/70-yes-bitmaps.conf':
+    ensure  => '/usr/share/fontconfig/conf.avail/70-yes-bitmaps.conf',
+    owner   => 'root',
+    group   => 'root',
+    require => Package['fontconfig'],
+  }
+
+  file { '/etc/fonts/conf.d/70-no-bitmaps.conf':
+    ensure  => absent,
+    require => Package['fontconfig'],
+  }
+
+  Exec['fontconfig-reconfigure'] {
+    subscribe   => File['/etc/fonts/conf.d/70-yes-bitmaps.conf',
+                        '/etc/fonts/conf.d/70-no-bitmaps.conf'],
+  }
+}