• Stars
    star
    178
  • Rank 214,989 (Top 5 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Test your fonts across the web by easily overriding fonts on any webpage.

type-x icon

Type-X: test your fonts across the web!

Type-X is currently unlisted from the Chrome Web Store for maintenance.
However, it can still be used in Chrome Developer Mode (see below).


Type-X is a Google Chrome extension that makes it easy and efficient to test local fonts on any website.

  • Browse comfortably to experience your own fonts in context, with blazing-fast font injection and a one-click override.
  • Use your local fonts or add custom font files directly to test real web font files โ€“ WOFF & WOFF2 included (all fonts stay on your computer).
  • Take full control over how you apply your fonts with custom CSS selectors and styles.
  • Avoid "tofu" from icon fonts with preset and custom selectors to ignore icon elements.

Type-X in use to apply font overrides to Wikipedia

Why?

Type designers spend countless hours creating type proofs and fake designs to test their fonts. This is a vital part of the type design process, but sometimes the best way to understand how a font works (and what needs fixing) is to experience it as a reader, not as a designer.

Likewise, web designers & developers spend a lot of time guessing what different fonts might look like in their apps, but testing actual fonts in context requires someone to either dig into the CSS or to mess with clunky CSS-override browser extensions.

Additionally, almost anyone may have reasons they want to easily override fonts on the web. Maybe they are trying out a new typeface and want to get an idea of what it feels like to look at, read, and use. Maybe they just prefer to browse the news in a particular font.

Whatever reason you want to override fonts, Type-X makes it fast, easy, and fun. Just visit any webpage, then hit a button to swap fonts! Open the extensionโ€™s settings panel to try different fonts from your collection, just like you would in a desktop app. Need to tweak the styles to make it work just-so? Customize the selectors you target and the CSS styles you apply, all within the extension.

Installation

Type-X is currently unlisted from the Chrome Web Store for maintenance. However, it can still be used in Chrome Developer Mode.

Install in Developer Mode

If you wish to develop or edit the extension itself, you can clone this repo and use it in Chrome:

  1. Download the latest release from https://github.com/arrowtype/type-x/releases
  2. Unzip the release. This will change it to a folder called dist (short for "distribution").
  3. Go to chrome://extensions/ in Chrome
  4. Turn on "Developer Mode"
  5. Click "Load unpacked"
  6. Click "Load unpacked" and navigate to the dist folder of the repo you cloned โ€“ alternatively, you can just drag-n-drop the dist folder into the extensions page.

Development

If you wish to work on the code of Type-X, follow these steps, then install in developer mode (see above).

  1. Git Clone the repo
  2. Run yarn to set up dependencies, then yarn build to build
  3. Extension will be saved in the dist folder

Usage

Basics

Click the switch to activate font overrides! Click it again to remove your overrides.

Click the menu icon (โ˜ฐ) to control your font overrides.

Font Overrides

Type-X can have one or more font overrides at a given time, and these overrides are applied to all web pages you visit with Type-X activated.

To add a new override, click the + button.

To customize an override, click the โ€บ icon to expand it.

To remove an override, expand one of the font overrides and click Delete. Note: deleting an override does not delete the font file, even if you have loaded the font file directly into the extension.

Apply edits (visible after any change)

If you have made a change to a font override, this button will appear in the top bar. Click it to apply your changes.

Font menu

Select any font that is local to your computer, or any font that you have loaded into the extension.

Loading fonts

If you wish to load a specific font file (e.g. to test coolfont-italic.woff2), click the load icon next to the font menu.

Note: if you have loaded a lot of fonts, it is possible you may eventually hit a slowdown. In this case, see Installation instructions above to install this in Developer Mode.

Using variable fonts

Type-X can't parse local variable fonts. To use use a variable font and have Type-X automatically detect axes to provide sliders, you must load the font file as specified above.

Note: the sliders are shown to assist you in selecting your preferred axis location. For performance reasons, Type-X doesn't currently have a live-reloading form, meaning that you must click "Apply Edits" to make your axis-slider changes take effect.

If you prefer writing CSS to using the axis sliders (for instance, in order to specify exact axis values), you can alternatively do this with font-variation-settings, like so:

font-variation-settings: "wght" 550, "slnt" -9;

Elements: Targeting specific items to style

If you are adding font overrides, you may want to override specific parts of the web in specific ways. By default, Type-X styles all "code" elements in a monospaced font, and everything else in a proportional (natural-width) font.

Maybe you want to style headings in a display font, like Papyrus. You could get pretty close by using something like the following:

h1, h1 *, h2, h2 *, h3, h3 *

Maybe you want to target all links on a page. You could probably get close with selectors like this:

a, button

Using CSS selectors requires some knowledge of HTML and CSS, but you can do a lot by knowing just a few basics. Mozilla writes excellent guides to web technology, and if you'd like to learn more about selectors, take a look at their article Introduction to CSS: Simple Selectors. Often, you may need to inspect an element to know how to target it with a CSS Selector. For this, Chrome's Inspect tool is very useful โ€“ here's an introduction to inspecting elements in Chrome.

CSS styles: Controlling styles of targeted items

You may want to control styles such as weight, size, or color in overridden text. If so, you can use CSS style properties to do so. For instance, if you want to make all text affected by a certain font override into bold, 20px, black text, you could use this style:

font-weight: bold;
font-size: 20px;
color: black;

Of course, using fewer style overrides is often better, so that you see your chosen font while disrupting a web page's styles as little as possible.

Selectors to ignore

This field is primarly here to help you avoid override elements which rely on icon fonts, as this can result in "tofu" โ€“ empty rectangles where a particular font doesn't support a certain glyph.

Several common or notable situations are already ignored with the pre-supplied selector list. If you come across other icon tofu, you can use this field to ignore certain elements, so you can continue happily browsing with overrides intact.

Currently, selectors in this list must be direct (not combined) selectors. That is, you can use .icon to ignore any element with the class of icon, but not .icon a, #menu li > span, buttons *, etc.

Contributing

Have you found selectors of icon fonts that might be worth adding to the preset "ignore" list?

Did you get stuck on something?

Have you found a bug?

Let us know! File an issue or make a pull request (please see Contributing guidelines).

More Repositories

1

recursive

Recursive Mono & Sans is a variable font family for code & UI
Python
3,252
star
2

shantell-sans

Shantell Sans, from Shantell Martin, is a marker-style font built for creative expression, typographic play, and animation.
HTML
400
star
3

recursive-code-config

Customize your own version of Recursive for code. Build your own, or find the built fonts in releases within the main Recursive repo.
Python
113
star
4

fonttools-intro

An introduction to FontTools & font development
83
star
5

spacing

A collection of resources & recommendations that are helpful for spacing
Python
55
star
6

NLI-test

A quick test of non-linear interpolation for variable fonts, using a โ€œhiddenโ€ source as quadratic offcurves.
HTML
39
star
7

varfont-prep

RoboFont scripts to help clean up working fonts for variable font builds
Python
20
star
8

drawbot--loop-through-font-glyphs

DrawBot scripts to loop through all glyphs of a built font binary (TTF or OTF), e.g. for use in proofing & SVG icon font conversion
Python
16
star
9

recursive-minisite

A minisite for Recursive Sans & Mono, a new variable font from ArrowType
HTML
14
star
10

recursive-theme

A WIP theme for VS Code. Based on Night Owl, but with chiller colors & tweaked italics.
13
star
11

shantell-sans-specimen

A minisite for Shantell Sans, from Shantell Martin, which is a marker-style font built for creative expression, typographic play, and animation.
Svelte
11
star
12

typelab-2021

A tutorial on the basics of shell scripting for font builds, for TypeLab 2021
Python
10
star
13

arrowtype-glyphs-scripts

Scripts for random stuff in GlyphsApp
Python
8
star
14

drawbot-vscode

A demo of how to use DrawBot in VS Code rather than its standalone app
7
star
15

80forty

The utility of an 80% keyboard in a 40% layout
6
star
16

blog

Notes on type design & development
CSS
5
star
17

vf-slnt-test

Tests for browser support of CSS font-style property & variable fonts
HTML
4
star
18

name-sans-roadmap

This repo is a public roadmap for Name Sans, currently in-progress and available at Future Fonts
4
star
19

bern

Name Sans, made Swiss
3
star
20

ufo-workshop-april_2021

A slide presentation put together to explain aspects of why & how I use UFOs in variable font design project.
3
star
21

vf-default-instance-test

A test for a font handling bug on macOS Catalina
2
star
22

web-font-test-templates

test your fonts
HTML
2
star
23

overlapping-axis-test

A test of what happens if two axes in a variable font have an overlapping functionality.
Shell
2
star
24

charsets

A place to store & share useful starter character sets for type design in RoboFont.
Python
2
star
25

svelte-slider

A simple example of a slider component for SvelteJS
HTML
2
star
26

advice

Links to go along with a lecture of advice to college students
1
star
27

rf-guides

A few very simple scripts to quickly manage guidelines in RoboFont.
Python
1
star
28

safari-opsz-test

HTML
1
star
29

agl-naming-script

Applying AGL (Adobe Glyph List) names to a font based on Unicode values assigned to glyphs
Python
1
star
30

keebio-nyquist-minimalist-case

Plate/case designs for the Keebio Nyquist (Rev 3.5)
1
star
31

type-blog

This is the start of a blog. For now, it is just a repo.
1
star
32

arrowtype-robofont-helpers

Scripts I find useful in RoboFont. Many come from the forum or other public sources. I try to include credits in code documentation.
Python
1
star