diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-04-01 16:54:30 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-04-01 17:31:35 +0200 |
| commit | 17c8e8198486d22ab3de510c984d96313475fe24 (patch) | |
| tree | ae1a2b967860be1357773c25dc934ed1c2b349d4 /roles/font | |
| parent | 5a7d58027f6e57cba6ce633fb291662f45c30bd4 (diff) | |
Replace AUR font package installing with google fonts via gstatic
Diffstat (limited to 'roles/font')
| -rw-r--r-- | roles/font/meta/main.yml | 4 | ||||
| -rw-r--r-- | roles/font/tasks/install-archlinux.yml | 9 | ||||
| -rw-r--r-- | roles/font/tasks/install-debian.yml | 1 | ||||
| -rw-r--r-- | roles/font/tasks/main.yml | 18 | ||||
| -rw-r--r-- | roles/font/vars/archlinux.yml | 11 | ||||
| -rw-r--r-- | roles/font/vars/debian.yml | 2 |
6 files changed, 28 insertions, 17 deletions
diff --git a/roles/font/meta/main.yml b/roles/font/meta/main.yml index b9f45ad7..b1706f98 100644 --- a/roles/font/meta/main.yml +++ b/roles/font/meta/main.yml @@ -1,7 +1,5 @@ --- -dependencies: - - role: "yay" - when: ansible_facts['distribution'] == "Archlinux" +dependencies: [] galaxy_info: author: "a14m" description: "Install fonts on linux distros." diff --git a/roles/font/tasks/install-archlinux.yml b/roles/font/tasks/install-archlinux.yml deleted file mode 100644 index ee44f05a..00000000 --- a/roles/font/tasks/install-archlinux.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- name: "Ensure AUR fonts are installed" - become: true - become_user: "aur_builder" - kewlfft.aur.aur: - name: "{{ item }}" - state: "present" - use: "yay" - loop: "{{ font_aur_packages }}" diff --git a/roles/font/tasks/install-debian.yml b/roles/font/tasks/install-debian.yml deleted file mode 100644 index ed97d539..00000000 --- a/roles/font/tasks/install-debian.yml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/roles/font/tasks/main.yml b/roles/font/tasks/main.yml index 4753a161..1626b2f4 100644 --- a/roles/font/tasks/main.yml +++ b/roles/font/tasks/main.yml @@ -45,5 +45,19 @@ state: "link" loop: "{{ font_presets }}" -- name: "Ensure OS-specific fonts are installed" - ansible.builtin.include_tasks: "install-{{ ansible_facts['os_family'] | lower }}.yml" +- name: "Ensure Google Fonts directory exists" + become: true + ansible.builtin.file: + path: "/usr/share/fonts/google-fonts" + state: "directory" + mode: "0755" + +- name: "Install Google Fonts" + become: true + ansible.builtin.get_url: + url: "{{ item.url }}" + dest: "/usr/share/fonts/google-fonts/{{ item.dest }}" + mode: "0644" + loop: "{{ font_google_fonts }}" + notify: + - "Update font-cache" diff --git a/roles/font/vars/archlinux.yml b/roles/font/vars/archlinux.yml index 2197e5cb..597e73b2 100644 --- a/roles/font/vars/archlinux.yml +++ b/roles/font/vars/archlinux.yml @@ -5,8 +5,15 @@ font_packages: - "noto-fonts" - "noto-fonts-emoji" -font_aur_packages: - - "ttf-pt-sans" +font_google_fonts: + - url: "https://fonts.gstatic.com/s/ptsans/v18/jizaRExUiTo99u79P0WOxOGMMDQ.ttf" + dest: "PTSans-Regular.ttf" + - url: "https://fonts.gstatic.com/s/ptsans/v18/jizYRExUiTo99u79D0eEwMOJIDQA-g.ttf" + dest: "PTSans-Italic.ttf" + - url: "https://fonts.gstatic.com/s/ptsans/v18/jizfRExUiTo99u79B_mh4OmnLD0Z4zM.ttf" + dest: "PTSans-Bold.ttf" + - url: "https://fonts.gstatic.com/s/ptsans/v18/jizdRExUiTo99u79D0e8fOytKB8c8zMrig.ttf" + dest: "PTSans-BoldItalic.ttf" font_presets: - src: "/usr/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf" diff --git a/roles/font/vars/debian.yml b/roles/font/vars/debian.yml index 06b8ca1b..bb80b1a1 100644 --- a/roles/font/vars/debian.yml +++ b/roles/font/vars/debian.yml @@ -8,6 +8,8 @@ font_packages: - "fonts-noto-color-emoji" - "fonts-noto-extra" +font_google_fonts: [] + font_presets: - src: "/usr/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf" dest: "/etc/fonts/conf.d/10-sub-pixel-rgb.conf" |
