Skip to content

Conversation

@meisenzahl
Copy link
Member

@meisenzahl meisenzahl commented Feb 6, 2021

Closes #163

@cassidyjames and @hanaral could you please test this:

You have to open /usr/share/initramfs-tools/hooks/plymouth

sudo nano /usr/share/initramfs-tools/hooks/plymouth

go to line 134 and replace this

# Make Ubuntu the default sans-serif, and mono fonts.  Ubuntu
# font is always present if we have python-label installed; if
# not installed, then we have no graphical themes that display
# text, so that's ok.
if [ -e /usr/share/fonts/truetype/ubuntu/Ubuntu-R.ttf ]
then
    sed 's|\(<family>DejaVu Sans</family>\)|<family>Ubuntu</family>\1|;s|\(<family>DejaVu Sans Mono<>
        /etc/fonts/conf.d/60-latin.conf > "${DESTDIR}/etc/fonts/conf.d/60-latin.conf"
    mkdir -p "${DESTDIR}/usr/share/fonts/truetype/ubuntu"
    cp -a /usr/share/fonts/truetype/ubuntu/Ubuntu-R.ttf "${DESTDIR}/usr/share/fonts/truetype/ubuntu"
    cp -a /usr/share/fonts/truetype/ubuntu/UbuntuMono-R.ttf "${DESTDIR}/usr/share/fonts/truetype/ubu>
fi

with this

cp /etc/fonts/conf.d/60-latin.conf "${DESTDIR}/etc/fonts/conf.d/60-latin.conf"

# Make Inter the default sans-serif font
if [ -e /usr/share/fonts/opentype/inter/Inter-Regular.otf ]
then
    sed -i 's|\(<family>DejaVu Sans</family>\)|<family>Inter</family>\1|;' "${DESTDIR}/etc/fonts/conf.d/60-latin.conf"
    mkdir -p "${DESTDIR}/usr/share/fonts/opentype/inter"
    cp -a /usr/share/fonts/opentype/inter/Inter-Regular.otf "${DESTDIR}/usr/share/fonts/opentype/inter"
fi

# Make Roboto Mono the default mono font
if [ -e /usr/share/fonts/truetype/roboto-mono-elementary/RobotoMono-Regular.ttf ]
then
    sed -i 's|\(<family>DejaVu Sans Mono</family>\)|<family>Roboto Mono</family>\1|;' "${DESTDIR}/etc/fonts/conf.d/60-latin.conf"
    mkdir -p "${DESTDIR}/usr/share/fonts/truetype/roboto-mono-elementary"
    cp -a /usr/share/fonts/truetype/roboto-mono-elementary/RobotoMono-Regular.ttf "${DESTDIR}/usr/share/fonts/truetype/roboto-mono-elementary"
fi

After that you have to rebuild the initramfs with

sudo update-initramfs -u -k all

Now reboot to check if it worked.

Don't worry, you can reset your plymouth config with

sudo apt reinstall plymouth

@meisenzahl
Copy link
Member Author

Used default fonts from https://github.com/elementary/default-settings/blob/28245e3f3bd08663854be3cf67d29dfa45bcce1a/overrides/default-settings.gschema.override.in#L30-L33

font-name='Inter 9'
gtk-theme='io.elementary.stylesheet.blueberry'
icon-theme='elementary'
monospace-font-name='Roboto Mono 10'

@meisenzahl meisenzahl changed the title Change default fonts plymouth: Change default fonts Feb 6, 2021
@hanaral
Copy link

hanaral commented Feb 6, 2021

It works!™️

@cassidyjames cassidyjames merged commit be1d780 into plymouth-focal-patched Feb 10, 2021
@cassidyjames cassidyjames deleted the change-default-fonts branch February 10, 2021 17:16
danirabbit pushed a commit that referenced this pull request Oct 27, 2022
danirabbit pushed a commit that referenced this pull request Dec 22, 2022
* Remove Ubuntu watermark

* Change default fonts

* Fix whitespace

* Add new line

* Make Roboto Mono the default mono font
danirabbit pushed a commit that referenced this pull request Dec 22, 2022
* Remove Ubuntu watermark

* Change default fonts

* Fix whitespace

* Add new line

* Make Roboto Mono the default mono font
danirabbit pushed a commit that referenced this pull request May 1, 2024
* Remove Ubuntu watermark

* Change default fonts

* Fix whitespace

* Add new line

* Make Roboto Mono the default mono font
tintou pushed a commit that referenced this pull request May 3, 2024
* Remove Ubuntu watermark

* Change default fonts

* Fix whitespace

* Add new line

* Make Roboto Mono the default mono font
ryonakano pushed a commit that referenced this pull request Mar 27, 2025
* Remove Ubuntu watermark

* Change default fonts

* Fix whitespace

* Add new line

* Make Roboto Mono the default mono font
ryonakano pushed a commit that referenced this pull request Mar 27, 2025
* Remove Ubuntu watermark

* Change default fonts

* Fix whitespace

* Add new line

* Make Roboto Mono the default mono font
tintou pushed a commit that referenced this pull request May 10, 2025
* Remove Ubuntu watermark

* Change default fonts

* Fix whitespace

* Add new line

* Make Roboto Mono the default mono font
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants