Skip to content

Instantly share code, notes, and snippets.

@CrendKing
CrendKing / browser-font-fallback.md
Last active Feb 13, 2020
browser-font-fallback.md
View browser-font-fallback.md

This document records my conclusions of experimenting Firefox 68 and Chromium 74 font fallback mechanism on Windows, as dated of the writing time.

Definition of font fallback

Both Firefox and Chromium allow users to configure the desired fonts used for displaying HTML in various languages. The HTML language is specified in the <html lang={lang}> tag. For instance, a Chinese webpage could be written as <html lang="zh"> or more specifically <html lang="zh-CN">. English webpage is <html lang="en"> or simplify lefting out the lang tag (although strongly discouraged by the W3C standard). The per-script font setting in Chromium is unlocked with the Advanced Font Settings extension.

When the webpage specify the font list to be used for certain element in CSS, the browsers will first search its font cache for

View google_search_by_image.py
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import argparse
import atexit
import http.client
import math
import os
import re
View .tmux.conf
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# C-b is not acceptable -- Vim uses it
set -g prefix C-a
# Start numbering at 1
set -g base-index 1
# Allows for faster key repetition
set -s escape-time 0
View .vimrc
" Best Goddamn vimrc in the whole world.
" Author: Seth House <seth@eseth.com>
" Modified: $LastChangedDate: 2009-02-14 13:14:23 -0700 (Sat, 14 Feb 2009) $
" For more information type :help followed by the command.
" Use Vim settings, rather then Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
source $VIMRUNTIME/mswin.vim
View chrome_updater.py
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import atexit
import os
import shutil
import time
import urllib.error
import urllib.request
You can’t perform that action at this time.