Subsetting (Chinese) Fonts


There are loads of really delightful Simplified and Traditional Chinese True Type Fonts available on the web. There's only one issue - the file sizes are really large. In many cases, too large to effectively use as a web-font. For example, this calligraphy style font is 3.4MB. The beautiful Paper Cut Font weighs in at […] Read More

A UTF-8 Aware substr_replace (for use in App.net)


So, I stayed up bashing my head against a brick wall all last night! PHP's string functions aren't (yet) UTF-8 aware. This is a replacement for subtr_replace which should work on UTF-8 Strings: function utf8_substr_replace($original, $replacement, $position, $length) { $startString = mb_substr($original, 0, $position, "UTF-8"); $endString = mb_substr($original, $position + $length, mb_strlen($original), "UTF-8"); $out = […] Read More