Sans-serif fonts and Japanese text, redux: It’s Webkit’s fault

I don’t use iTunes, and the last time I bought anything from the iTunes store was some time in 2008. The recent shutdown of, however, resulted in a $40 credit at the iTunes store, so I decided to update the software and shop around.

While I was updating iTunes, I figured I may as well install Safari for Windows, just to take a cursory look at my websites.

So all those problems with Japanese text and sans-serif fonts I’ve been laying down at Google Chrome’s feet? Well, it’s not Chrome’s fault entirely — it’s Webkit’s fault.

Chrome runs on the Webkit engine, which also powers Safari. Viewing this site in Safari produces the same result — no font substitution when a sans-serif Japanese font is required. A visit to on Safari confirms it — the site looks borked on Safari as well.

Just to be thorough, I checked Opera as well. It can handle sans-serif Japanese font substitution fine, although it looks a bit ugly.

UPDATE, 02/27/2011, 08:13: Well, I finally joined the 21st Century and upgraded from Windows XP to Windows 7. Aside from all the User Access Control prompts and annoyances with running programs as an administrator, I have to say I rather like some of the subtle touches of Windows 7, but that’s not the point of this update.

Windows 7 and Webkit are rendering Japanese text styled with a sans-serif font. Rather, it falls back on a default font (even if it’s a serif font) than showing nothing at all. This issue hasn’t been fixed in Windows XP, which is inconvenient for anyone holding out on upgrading.

Google Chrome won’t render Japanese text with a sans-serif CSS

Here’s some text in Japanese: このセンテンスは日本語で書いた。

Nothing strange so far, right?

Here’s the same sentence in a <span/> tag with a style attribute specifying Helvetica, Verdana and Arial fonts: このセンテンスは日本語で書いた。

If you’re using Google Chrome, you may not even see the sentence at all. It will, however, render when you view the source code.

Curious to know why some parts of my sites render Japanese text and others do not, I started inspecting elements with Japanese text in Chrome, enabling and disabling rules. When I disabled font-family rules specifying sans-serif fonts, the Japanese text re-appeared. Enabling the sans-serif rule made them disappear again.

Continue reading »

Google Chrome can’t handle this site, or why you gotta be difficult all your life?

Back when social media sites were cropping up left and right, I had a test to determine whether it could handle my more esoteric interests: Does it support Japanese characters?

I signed up with Twitter a good six months before it took off at SXSW in 2007, and one of the first things I did was tweet in Japanese. Success! I signed up with Grooveshark around the same time and tried to share some upload some music tagged in Japanese. I saw question marks where there should have been text. Failure.

Google Chrome is gaining market share, and even I have to admit I like its speed. But one thing prevents me from adopting it — it can’t handle the Japanese characters on my site.

That’s not to say it can’t handle Japanese — I can visit HMV with no problems, but Bounce looks totally messed up.

Continue reading »

I don’t think Hula’s has been around that long …

Teh Gay

This American Life has an entire show dedicated to the story about how homosexuality was removed from the Diagnostic and Statistical Manual of Mental Disorders, or the DSM-IV. The hour-long show is fascinating, but I was struck in particular by how one of the most pivotal events in the story happened at a gay bar in Hawai"i.

Part of me would like to visualize Hula’s Bar and Lei Stand as the scene of that moment, but Hula’s has been around for 35 years, according to its web site. That would put it around 1975. The American Psychiatric Association revised the entry in 1973, then removed it entirely in 1987. Maybe it’s plausible?

How does a programmer get to Carnegie Hall?

I don’t usually leave comments on blogs I don’t frequent — and honestly, I don’t really comment on blogs I do frequent — but back in late February 2010, someone on DZone posted a link to a blog entry from 2008 answering another blog entry regarding the role of passion in programming.

A semantic argument ensued, which usually happens when definitions of adjectives are up for debate, but in this case, both authors are correct. Passion, professionalism — they’re not mutually exclusive in the realm of programming. But both writers managed to talk around the one point on which they agreed.

The Carnegie Hall web site makes a coy reference to that age-old joke, "How do you get to Carnegie Hall?" The reply: practice.

If you want to improve a skill — be it C# or C-Sharp — you need to practice. To become a master at that particular skill, you need to practice for 10,000 hours.

Malcolm Gladwell seems to get all the press regarding this figure, but Daniel J. Levitan mentioned it first in his book, This Is Your Brain on Music. Levitan says it’s a well-researched figure, and I haven’t scoured the footnotes of the book to verify. Intuitively, it makes sense.

Continue reading »

Lessons of a video dolt, pt. 2: Resolutions can wait

Technophilia Visual

Disclaimer: I’m not a video expert, so this tutorial may be entirely wrong. It reflects only my understanding of what I’ve learned so far about editing video files.

Note: I had intended to write a series of tutorials while I dealt with some menial task for a video project, but those tasks turned out to be easier than expected. So I’m not sure how many more of these entries I’ll write.

There are a lot of places on the Interwebs where you can find out about video resolutions and the first two links provided by Google are good places to start.

Assuming you can get through all the jargon that gets thrown around.

Here’s the thing you should come away with in learning about video resolution: there are many ways to describe the same thing.

Let’s begin with aspect ratio, the width of an image divided by its height. Long ago and far away when televisions started inching their way into American homes, film studios combated the perceived threat of the medium by expanding the size of the theater screen. As a result, films have an aspect ratio of 16:9, while TV has an aspect ratio of 4:3. That’s the simple history of aspect ratios.

Now comes the hard part.

Continue reading »

If by "rock star", you mean "can’t read music"

I always have to snicker whenever I see a job posting asking for "rock star developers". What does that mean? I picture someone who draws attention to themselves by the sheer force of their software engineering acumen, coupled with an over-sized ego and an even bigger dope addiction.

"Rock star developer" used to mean one thing but now is meaning something else. I sometimes look at those job postings and wonder if these employers would prefer a "classical developer" instead.

I am a classically-trained musician, although you wouldn’t know it if you heard me try to bang through the Tocatta by Aram Khachaturian. When I was learning the first movement of Ludwig Van Beethoven’s Moonlight Sonata, I wasn’t concentrating on the individual notes so much as I was listening for the overall harmonic rhythm. I could sense when one diminished seventh would fake out a resolution to another diminished seventh, till it finally reached the tonic, which was not necessarily in the root key established at the start of the piece.

Continue reading »

Lessons of a video dolt, pt. 1: Bring yr camera and know yr codecs

Technophilia Visual

Disclaimer: I’m not a video expert, so this tutorial may be entirely wrong. It reflects only my understanding of what I’ve learned so far about editing video files.

Any explanation of digital video begins with an understanding coders and decoders. The proper parlance for this concept is codec. This word is important to learn. Take it to heart.

Digital video takes up a lot of space, much, much more than audio. An uncompressed audio file can be dozens of megabytes. An uncompressed video file can be dozens, even hundreds, of gigabytes. Back in the late ’90s, when I made my first tip-toe into the depths of digital audio, 6GB hard drives felt voluminous, but they were no match for the demands of space-hogging WAV files.

Today’s late-aught hard drives make those 6GB drives look puny, so a 100MB WAV file doesn’t seem so greedy. But even a 1.5-terabyte drive is no match for hours of uncompressed video files. Till such a day comes when drive space approaches infinity, codecs are a fact of life.

And damn are there a lot of them.

Continue reading »

Lessons of a video dolt, introduction: Audio is easy

Technophilia Visual

Since 2005 — or perhaps even 2000 — I’ve been schooling myself on the ins and outs of recording my own music. I’ve had help in the form of numerous classes at Austin Community College, but software for setting music down on digital bits is not too difficult to learn.

I’m at the point where my workflow is pretty solid — get the MIDI parts down, record those MIDI parts to audio, lay some vocals over those tracks, apply effects processing to all that audio, mix it down, do some quick mastering and pow — ready to hear.

It took a few years before I really got how effects, particularly equialization, work, and I had to redo a lot of stuff multiple times just to get the sound I have today.

That shot of confidence in my achievements made me think video would be just as surmountable.

What an idiot.

Continue reading »