Skip to content

jcs-elpa/use-ttf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: GPL v3 MELPA MELPA Stable

use-ttf

Keep font consistency across different OSs.

CI Activate

I created this for people who have problems with their fonts not working over different OS’s due to different installation methods used in different OS’s. The purpose of this package is to automatically install font files (.ttf) based on the OS you’re using. Saving you time from manually installing fonts.

Windows 10 / Ubuntu Mono Ubuntu 14 / Classic Console Mac OS / Ubuntu Mono

Caution

MAKE SURE EMACS HAS THE PERMISSION TO INSTALL FONTS!

📝 Configuration

List of TTF fonts you want to use and install in the currnet OS.

;; I just have all my fonts inside my '.emacs.d' directory for sake of simplicity.
;; But you can have your font at any directory you want.
(setq use-ttf-default-ttf-fonts '(;; >> Classic Console <<
                                  "~/.emacs.d/fonts/clacon.ttf"
                                  ;; >> Ubuntu Mono <<
                                  "~/.emacs.d/fonts/UbuntuMono-R.ttf"))

Name of the font you want to use as default. I choose Ubuntu Mono as my default font.

(setq use-ttf-default-ttf-font-name "Ubuntu Mono")

🔧 Usage

Install fonts into the current OS. The more .ttf file you try to install might take a while, but this function does not block the Emacs' process itself. Furthermore, you will want to call use-ttf-set-default-font function after install all the fonts in the use-ttf-default-ttf-fonts list.

M-x use-ttf-install-fonts

Use the font by use-ttf-default-ttf-font-name variable. This will actually set your Emacs to your target font.

M-x use-ttf-set-default-font

🛠️ Contribute

PRs Welcome Elisp styleguide Donate on paypal Become a patron

If you would like to contribute to this project, you may either clone and make pull requests to this repository. Or you can clone the project and establish your own branch of this tool. Any methods are welcome!

🔬 Development

To run the test locally, you will need the following tools:

Install all dependencies and development dependencies:

$ eask install-deps --dev

To test the package's installation:

$ eask package
$ eask install

To test compilation:

$ eask compile

🪧 The following steps are optional, but we recommend you follow these lint results!

The built-in checkdoc linter:

$ eask lint checkdoc

The standard package linter:

$ eask lint package

📝 P.S. For more information, find the Eask manual at https://emacs-eask.github.io/.

⚜️ License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

See LICENSE for details.