/AdaptiFont

Repository for the paper on AdaptiFont: Increasing individuals’ reading speed with a generative fontmodel and Bayesian optimization

Primary LanguageJupyter NotebookMIT LicenseMIT

AdaptiFont

Repository accompanying the publication:
Kadner, F., Keller, Y., & Rothkopf, C. (2021, May). AdaptiFont: Increasing Individuals’ Reading Speed with a Generative Font Model and Bayesian Optimization. In Proceedings of the 2021 CHI Conference on Human Factors in Computing Systems (pp. 1-11).

What is provided  •   Truetype fonts  •   Linux installation  •   Morph fonts

What is Provided?

This Repositiory supplys additional material for the paper on AdaptiFont: Increasing individuals’ reading speed with a generative font model and Bayesian optimization. Provided are usable fonts in the truetype font (.ttf) format from the centroids of the best clusters for all subjects, as well as a script that you can use to combine your own fonts from the NMF components.

Best fonts per subject

Subject Truetype font NMF components How it looks
1 subject1.ttf 4.56, 5.32, 5.57 subject1.svg
2 subject2.ttf 5.5, 1.89, 3.66 subject2.svg
3 subject3.ttf 4.56, 4.1, 6.41 subject3.svg
4 subject4.ttf 4.32, 3.76, 5.32 subject4.svg
5 subject5.ttf 4.39, 2.44, 5.59 subject5.svg
6 subject6.ttf 5.80, 1.1, 1.86 subject6.svg
7 subject7.ttf 6.63, 1.59, 2.54 subject7.svg
8 subject8.ttf 5.37, 3.54, 3.56 subject8.svg
9 subject9.ttf 4.27, 3.5, 4.15 subject9.svg
10 subject10.ttf 5.63, 5.38, 1.3 subject10.svg
11 subject11.ttf 5.7, 3.02, 3.08 subject11.svg

Linux installation

  1. Clone this repository
  2. Install python header files sudo apt install python3.6-dev (May be called differently based on your python3 version)
  3. (Optional) Create a fresh python 3 virtualenv and activate it for example using sudo apt install virtualenv, virtualenv venv --python=python3, . venv/bin/activate. I used 3.6.9, but most python 3 versions should do.
  4. Install python dependencies pip install numpy pillow matplotlib fontTools
  5. Install fontforge from ppa sudo add-apt-repository ppa:silnrsi/smith-py3 sudo apt-get update sudo apt install python3-fontforge
  6. You may need to install libfontforge-dev sudo apt install libfontforge-dev
  7. Restart your Terminal and you should be ready to go creating your own fonts.

Morph your own fonts

There is a tutorial provided on how to create your own fonts in Creating_Fonts.ipynb. For that you will need jupyter and matplotlib pip install jupyter matplotlib. You can also start creating fonts directly from terminal using the create_font.py script. From the repositorys root call for example python3 font_factory/create_font.py example --nmf_dims 1,5,8 --out_folder example_fonts to create a font called example.ttf in example_fonts/example with the NMF component weights of 1,5 and 8 for the 3 dimensions respectively.