- Mac OS X 背后的故事(一)力挽狂澜的Ellen Hancock
- Mac OS X 背后的故事(二)Linus Torvalds的短视
- Mac OS X 背后的故事(三)Mach之父Avie Tevanian
- Mac OS X 背后的故事(四)政客的跨界
- Mac OS X 背後的故事(五)Jean-Marie Hullot 的天才天才發明 Interface Builder
- Mac OS X 背后的故事(六)上善若水 Cordell Ratzlaff 引发的 Aqua 革命(上)
- Mac OS X 背後的故事(七)上善若水 Cordell Ratzlaff 引發的 Aqua 革命(下)
- Mac OS X 背後的故事(八)三好學生 Chris Lattner 的 LLVM 編譯工具鏈
- Mac OS X 背後的故事(九)半導體的豐收(上)
- [Mac OS X 背後的故事(十)半導體的豐收(中)](https
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%!PS-Adobe-3.0 Resource-CMap | |
%%DocumentNeededResources: ProcSet (CIDInit) | |
%%IncludeResource: ProcSet (CIDInit) | |
%%BeginResource: CMap (UniSourceHanSansJP-UTF16-H) | |
%%Title: (UniSourceHanSansJP-UTF16-H Adobe Identity 0) | |
%%Version: 1.000 | |
%%Copyright: ----------------------------------------------------------- | |
%%Copyright: Copyright 1990-2014 Adobe Systems Incorporated. | |
%%Copyright: All rights reserved. | |
%%Copyright: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
my $srcbase = "shsglyphs"; | |
my $tfmbase = "sourcehans-r-j49"; | |
our @shs_width; | |
require "shs_width.pl"; | |
my $maxcc = $#shs_width; $shs_width[0] = -1; | |
my (@wdi, @wdr); | |
{ | |
my (%rp); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thanks to commenters for providing the base of this much nicer implementation! | |
# Save and run with $ python 0dedict.py | |
# You may need to hunt down the dictionary files yourself and change the awful path string below. | |
# This works for me on MacOS 10.14 Mohave | |
from struct import unpack | |
from zlib import decompress | |
import re | |
filename = '/System/Library/Assets/com_apple_MobileAsset_DictionaryServices_dictionaryOSX/9f5862030e8f00af171924ebbc23ebfd6e91af78.asset/AssetData/Oxford Dictionary of English.dictionary/Contents/Resources/Body.data' | |
f = open(filename, 'rb') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see https://stackoverflow.com/questions/51973437/reverse-pdf-imposition | |
import copy | |
import sys | |
import math | |
import pyPdf | |
""" | |
Reverse imposing: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Originally written on 2017-04-26 19:03. | |
# Welcome to my fancy Shift JIS explanation and simple implementation in Python. | |
# | |
# If you haven't heard of Shift JIS, it's a single or double-byte encoding for | |
# the JIS X 0201 and JIS X 0208 character sets, a bit like UTF-8 is for Unicode. | |
# | |
# The key feature of Shift JIS is being able to use both character sets at once, | |
# retaining legacy half-width ASCII and Katakana characters from JIS X 0201. | |
# |
This is a guide to Vim Script development for Python developers. Sample code for the various expressions, statements, functions and programming constructs is shown in both Python and Vim Script. This is not intended to be a tutorial for developing Vim scripts. It is assumed that the reader is familiar with Python programming.
For an introduction to Vim Script development, refer to usr_41.txt, eval.txt and Learn Vimscript the Hard Way
For a guide similar to this one for JavaScript developers, refer to Vim Script for the JavaScripter
This guide only describes the programming constructs that are present in both Python and Vim. The constructs that are unique to Vim (e.g. autocommands, [key-mapping](https://vimhelp.org/map.txt.html#key-m
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To see this run, you first stub out these imports. Then put the file in a Uint8Array. | |
// let slice = new Slice(array); | |
// let font = new OTFFont(slice); | |
// Then you can call methods like font.drawText(canvasContext, ) | |
// | |
// | |
import { ICanvasContext } from "./ICanvasContext" | |
import { log as Log } from "./log" | |
const log = Log.create("OPENTYPE"); |