Because I'm genetically pre-disposed to watch every piece of Star Wars content ever created, I signed up for a free trial of Disney's newest streaming service. As part of onboarding, it asked me to create a profile name. This is typically done so that multi-user households can have separate profiles and preferences. Mum doesn't have her princess stories disrupting Dad's suggestions. And Junior doesn't see what filth their parents are watching late at night. All the better to build up detailed…
Continue reading →
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 14MB! That file-size is far to heavy to embed on a web page. Subsetting Generally speaking, font files like .ttf contain a representation of every single character. 0-9,…
Continue reading →
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 = $startString . $replacement . $endString; return $out; …
Continue reading →