Skip to content

Instantly share code, notes, and snippets.

View lianghai's full-sized avatar

梁海 Liang Hai lianghai

View GitHub Profile
@jjgod
jjgod / sbix.patch
Created April 28, 2013 20:10
ttx fonttool patch to dump sbix table from Apple Color Emoji, according to http://typophile.com/node/96671#comment-524375 and http://kanji-database.sourceforge.net/fonts/opentype.html
commit 7f2ef9213b3a179d4b39fd921c6affb3d1553053
Author: Jiang Jiang <[email protected]>
Date: Sun Apr 28 18:17:50 2013 +0200
Add decompilation tool for sbix table used in Apple Color Emoji
diff --git a/Lib/fontTools/ttLib/tables/_s_b_i_x.py b/Lib/fontTools/ttLib/tables/_s_b_i_x.py
new file mode 100644
index 0000000..e126440
--- /dev/null
@jjgod
jjgod / fallback.m
Last active August 29, 2015 14:04
Test Core Text fallback line height.
// Compile with: clang fallback.m -framework CoreGraphics -framework CoreText -framework Foundation -o fallback
// Run with: ./fallback "Fallback Font Family" "Text to Typeset"
#import <ApplicationServices/ApplicationServices.h>
#import <Foundation/Foundation.h>
int main(int argc, char *argv[])
{
if (argc != 3)
return 0;
@Jaykul
Jaykul / Adding Fonts Without Elevation.md
Last active June 20, 2024 03:07
Temporary Font Install?

Did you know you can install fonts without elevation?

The catch is that they're only available for the duration of your session. They are, however, available in all apps across the system.

Someone asked about how to do it on Facebook this week, and at first, I just pointed them at the install script for PowerLineFonts which loops through all the fonts in a folder and install them.

I've used this more than a few times to install some fonts, including the PowerLine ones, which are great:

$sa = New-Object -ComObject Shell.Application
@js-choi
js-choi / compact-unicode-character-names.md
Last active January 22, 2025 22:35
Compact Unicode character names

Concise Unicode character names in JavaScript

J. S. Choi, 2022

⚠️ Warning: This article is not finished. The code will not yet run without errors.

All programmers must manipulate text; JavaScript programmers are no exception. Text manipulation often refers to specific characters, usually by their code points in hexadecimal – or by embedding the characters directly in source code.