summaryrefslogtreecommitdiff
path: root/suweren/home/services/fontutils.scm
blob: acfcc6412b66a77db2ca01447a36853abe251d3b (plain)
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
38
39
(define-module (suweren home services fontutils)
  ;; suweren-home-fontconfig-service-type [ home-fontconfig-service-type ]
  #:use-module (gnu home services fontutils)
  ;; suweren-home-fontconfig-service-type [ simple-service ]
  #:use-module (gnu services))

(define-public suweren-home-fontconfig-service-type
  (let* ((antialias '(match (@ (target "font"))
                       (edit (@ (mode "assign")
				(name "antialias"))
			     (bool "true"))))
	 (hinting '(match (@ (target "font"))
		     (edit (@ (mode "assign")
			      (name "hinting"))
			   (bool "false"))))
	 (hintstyle '(match (@ (target "font"))
		       (edit (@ (mode "assign")
				(name "hintstyle"))
			     (const "hintnone"))))
	 (rgba '(match (@ (target "font"))
		  (edit (@ (mode "assign")
			   (name "rgba"))
			(const "none"))))

	 ;; TODO sxml -> (sxml)
	 (rules (list antialias
		      hinting
		      hintstyle
		      rgba))

	 ;; TODO Remove the hardcoded path by using an appropriate variable.
	 ;; TODO string -> (sxml) -> fontconfig-extension
	 (extensions (list "~/.guix-home/profile/share/fonts"
			   rules)))

    ;; TODO symbol -> service-type? -> fontconfig-extension -> service
    (simple-service 'suweren-fontconfig
		    home-fontconfig-service-type
		    extensions)))