Skip to content

Instantly share code, notes, and snippets.

View chearon's full-sized avatar

Caleb Hearon chearon

View GitHub Profile
@CrendKing
CrendKing / browser-font-fallback.md
Last active May 11, 2024 05:14
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

@joseluisq
joseluisq / stash_dropped.md
Last active May 23, 2024 14:45
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.