All Projects → filamentgroup → Faux Pas

filamentgroup / Faux Pas

A script to highlight elements that are mismatched incorrectly to @​font-face blocks, which may result in shoddy faux bold or faux italic rendering.

Projects that are alternatives of or similar to Faux Pas

Powerline Web Fonts
Powerline Web Fonts for Chromebook
Stars: ✭ 178 (+91.4%)
Mutual labels:  font, web-fonts
webfont-kit-generator
Create @ font-face kits easily
Stars: ✭ 52 (-44.09%)
Mutual labels:  font, web-fonts
Hack
A typeface designed for source code
Stars: ✭ 14,543 (+15537.63%)
Mutual labels:  font, web-fonts
Woff2 Feature Test
A simple feature test for the WOFF2 font format
Stars: ✭ 106 (+13.98%)
Mutual labels:  font, web-fonts
Pokemon Font
GAME BOY font from Pokémon R/G/B/Y/G/S/C, Unicode extended.
Stars: ✭ 437 (+369.89%)
Mutual labels:  font, web-fonts
Webfont
Awesome generator of webfont
Stars: ✭ 170 (+82.8%)
Mutual labels:  font, web-fonts
glyphhanger
Your web font utility belt. It can subset web fonts. It can find unicode-ranges for you automatically. It makes julienne fries.
Stars: ✭ 422 (+353.76%)
Mutual labels:  font, web-fonts
Karmilla
An expanded version of the amazing Karla webfont, adding support for various languages (French, German, Norse, Hungarian, Latvian, Icelandic...)
Stars: ✭ 130 (+39.78%)
Mutual labels:  font, web-fonts
Fontfaceonload
A simple utility to execute a callback when a webfont loads.
Stars: ✭ 367 (+294.62%)
Mutual labels:  font, web-fonts
Brick
Open-source webfont service
Stars: ✭ 2,886 (+3003.23%)
Mutual labels:  font, web-fonts
gatsby-omni-font-loader
Font loader optimized for maximum performance. Removes render-blocking font resources and loads them asynchronusly. Handle FOUT & FOUC with font loading status watcher. Supports both local-hosted fonts and web fonts.
Stars: ✭ 98 (+5.38%)
Mutual labels:  font, web-fonts
Webfont Test
Test and analyze fonts for the web: Google fonts, system fonts and custom fonts.
Stars: ✭ 36 (-61.29%)
Mutual labels:  font, web-fonts
fonts
Web fonts that you probably won't find in a CDN
Stars: ✭ 26 (-72.04%)
Mutual labels:  font, web-fonts
Web Font Loading Recipes
A bunch of demos for different web font loading strategies. Companion to https://www.zachleat.com/web/comprehensive-webfonts/ Read more: https://www.zachleat.com/web/recipes/
Stars: ✭ 964 (+936.56%)
Mutual labels:  font, web-fonts
Glyphhanger
Your web font utility belt. It can subset web fonts. It can find unicode-ranges for you automatically. It makes julienne fries.
Stars: ✭ 1,099 (+1081.72%)
Mutual labels:  font, web-fonts
Styled Components Rhythm
Vertical Rhythm and Font Baselines with Styled Components
Stars: ✭ 76 (-18.28%)
Mutual labels:  font
Css Mono
Monospaced Typeface Created for CSS Coding
Stars: ✭ 85 (-8.6%)
Mutual labels:  font
Game Of Github
Play Game of Life in your GitHub contributions
Stars: ✭ 74 (-20.43%)
Mutual labels:  bookmarklet
Firamonaco
Monaco Font with Firacode ligatures and patched for Powerline 📝
Stars: ✭ 71 (-23.66%)
Mutual labels:  font
Official Bash Logo
Everything you need to start using the official GNU Bash logo
Stars: ✭ 89 (-4.3%)
Mutual labels:  font

faux pas, a faux web font detector

A script to highlight elements that are mismatched incorrectly to @font-face blocks, which may result in shoddy faux bold or faux italic rendering. Works standalone—no dependencies.

Want this on the command line? Check out node-faux-pas.

Demo

A more comprehensive test page is also available.

What is this?

When you include a CSS @font-face block on your page, you specify a font-family, font-weight, and font-style inside that block. When you use a web font, you specify those same properties on elements on your page. While you need to match the value of font-family exactly to use the web font, font-weight and font-style do not require exact matching. This can lead to unexpected behavior as the browser uses what is available, even if it’s not a good match.

Further, if your element wants a font-weight less than or equal to 500 but your @font-face block has only variants of your typeface that are bold, the browser will attempt to synthesize a bold web font for you. This synthesized rendering is often sub-par. The same synthesis happens when you want italic, but no italic web font is available. This behavior could be controlled with the font-synthesis property if browsers supported it.

faux-pas helps you by logging and reporting these mismatches and faux renderings so that you can fix the offending code.

Standard rendering of Open Sans

Standard Open Sans

Faux Bold Open Sans

Faux Bold Open Sans

Faux Italic Open Sans

Faux Italic Open Sans

Installation

Available on npm as fg-faux-pas:

npm install --save-dev fg-faux-pas

Usage

  • Bookmarklet: Get the bookmarklet at the demo page. Drag it to your bookmarklets and use where needed. By default it highlights elements on your page but check the console for more output.
  • Recommended: Include in your pattern library build. Include both faux-pas.js and faux-pas.init.js (tip: use your own init file to change configuration options).
  • Also on the command line: node-faux-pas

Options

  • console: true: uses console to output full logging information (warnings for mismatched elements and errors for faux rendering).
  • highlights: true: adds a specific style to mismatched/faux elements on the page for visual inspection.
  • mismatches: true: a mismatch may not be a faux rendering even though it’s a misconfiguration—this option allows you to disable these warnings.

Browser Support

Anything that supports the CSS Font Loading API:

  • Google Chrome 35+
  • Opera 22+
  • Firefox 41+
  • Safari 10+
  • Mobile Safari 10+
  • Android Chromium WebView
  • Chrome for Android
  • and others

Build

Use gulp to generate a new docs HTML file (automatically updates the bookmarklet with the latest code).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].