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.
Richwin-Xing-kai-jian-Fan-Font-fs8

The beautiful Paper Cut Font weighs in at 14MB!
Paper Cut Chinese Font-fs8

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, a-z, A-z, all the punctuation, non-English characters etc.

That's really useful if the font is installed on your computer and you want to write a document which could contain every character. It's less helpful if you want to use a fancy font on your website's headers.

Subsetting is the act of creating a subset of a font. That is, a font file which only contains specific characters.

Let's suppose that we only want a specific phrase rendered in this font.

<h1>我很丢脸。我没有吃Fruity Oaty Bar</h1>

We only need 19 unique characters - we can get rid of any character which doesn't appear in that heading.

There are sevel font manipulation tools available. I've chosen Font Optimizer which has an excellent live demo page. The source code is on BitBucket or on GitHub.

The command line syntax is really simple

./subset.pl --chars="我很丢脸。我没有吃Fruity Oaty Bar" input.ttf output.ttf

The file size reduction is impressive. My original font was over 14MB. The optimized one is 32KB

14,066,456 input.ttf
    32,084 output.ttf

The process run instantly - fast enough to run as a web service to generate these fonts dynamically, I would think.

One could quite easily create a scrap of JavaScript which read the contents of a block of text and then requested a font which contained only the necessary characters.

Apparently, Monotype have a proprietary and patent-pending solution to this rather trivial application.

Uses

Being able to subset fonts to reduce file size is incredibly useful. Supposing you want a different font for body text, headers, and navigation. Rather than having to load three large font files containing every character in the known universe, you could subset each one for only exactly the relevant characters.

This also has an interesting DRM like effect. Some people don't want their shiny web fonts to be downloaded and used as a regular font. With subsetting, the font only contains the specific characters.

Why Can't I Pay Tax Only On My Profits?

King of Google Eric Schmidt has written in The Guardian about how unfair it is that people don't think Google pay a fair share of taxes.

He makes three pretty good points.

  1. Companies only pay tax on their profits.
  2. Politicians shouldn't make laws with loopholes.
  3. International laws need harmonisation.

I agree with his second two points - although no-one is forcing Google to exploit the loopholes that it finds - but I am not sure I agree with the first.

Fairness, so it seems, is hardwired into our brains and our societies. People naturally get very angry when they encounter unfair situations. Even monkeys react badly when they see other monkeys being treated with favouritism.

I think that's what's happening here. As an individual, I don't get to only pay tax on my profits - I have to pay income tax and National Insurance on every penny I earn.

There are, as far as I can tell, only a few exceptions. If I donate money to charity through Payroll Giving or put money in my pension - I get a small measure of tax relief. If I receive rental income, I can offset any interest on a mortgage against it. That's pretty much it.

The tens of thousands of pounds of student loans that I owed did not count against the amount of tax I paid.
It cost me £3,000 to get a train to work and that severely cuts into my "profit" but doesn't count against tax.
I have to live somewhere - but mortgage relief was abolished by the Labour Government in 2000.
Heating, electricity, education, food - these are all legitimate expenses which I cannot offset against the amount HMRC wants to take from me.

I'm sure you can think of dozens of other examples. Expenses which a business can use to reduce their tax liability but which ordinary people cannot. And we haven't even touched on the inability of the average citizen to stuff their loot in an off-shore tax haven!

HMRC produce a great Android app which tells you roughly how the Government spends its money. It also shows you where it gets its money.
HMRC Income-fs8
Business, so it seems, pays a rather modest share by way of corporation tax. I'm sure they pay lots of other taxes and invest in other ways but guess what so do I!

I'll leave it to the armies of lawyers to figure out of Google, Amazon, Vodafone, and the like are acting correctly. But it is undeniable that a large number of people have trouble with large scale tax avoidance not because of its legality but because it is unavailable to ordinary individuals.

Fairness is really hard to codify, it's true. But when a multi-billion pound corporation gets to pay tax only on its profits, and individuals get no such relief, that feels profoundly unfair. And, like the chattering monkeys that we are, it enrages us.

Why Don't Startups Get Their Users To Invest In Them?

So, Yahoo! is to buy tumblr for $1.1 BEEEEEELLION.

I don't understand money. Well, specifically, I don't understand how companies are funded, classify shares, or any of that finance stuff. But, there's something which has been bothering me about the recent sale of some social media properties.

According to some estimates, tumblr has 170 million users.

$1.1 billion / 170 million users is.... double checks workings $6.47 per user.

Err... what? Even if those number are off by 50% - Yahoo have paid the equivalent of just $13 per user.

Now, I realise that $6 - $13 is a lot for some people, especially young people and those without disposable income. But it's not exactly an extravagant amount, is it? If a social network's worth is in selling advertising to users - you would expect said users to have enough income to be worthwhile advertising to.

Take, for example, Facebook. When they sold their shares they raised something like $16 billion and had roughly 901 million users.

Does sums. That's about $18 per user.

These are not huge sums for an individual.

The thing is, it's pretty hard for an ordinary person to buy a share of a company. You usually need to be able to buy a large quantity of shares, pay for a trading account, try not to get ripped off with various fees, and deal with taxes.

The Internet is making this slightly better - but market trading for small people still needs a hell of a lot of disruption. At the moment, I can't simply hand over the $26 I made in babysitting money and own a single share of Facebook.

I appreciate that selling your company isn't just about the money... but it seems that if you do want to raise cash, getting your users to invest may not be the worst idea in the world.

Sure, the transition from "user" to "part owner" may be uncomfortable - but it's not impossible. Look how Co-ops, Building Societies, and other partnerships manage it. Invested users could vote on major decisions, and feel a sense of pride and community in what they were achieving - not to mention the potential for receiving dividends or other forms or returns on their investment.

Take, for example, App.net. Users pay for their accounts on the microblogging service - developers like me pay slightly more. But we're still just sharecroppers tending someone else's plantation. This isn't a criticism of Dalton Caldwell and his team - but just being a customer isn't enough to convince me that the service won't suddenly shut down or follow some dark path.

I want to be an investor - a very small one - in the services I use. I don't want my attention to be sold to the highest bidder on the stock market.

Like I say, I don't really understand how corporate financing works. I'm sure there are lots of problems with my idea. Not least that Goldman Sachs wouldn't make quite as much money.

I sincerely think that Internet-scale companies should look to those with the most emotional investment to provide them with financial investment. Or they will end up selling not just their customers' eyeballs - but also their trust, loyalty, and love.

OpenTech 2013

Another year - another OpenTech! See blog posts from 2010 and 2011.
It feels like every year the event gets bigger and better. It's still the same crowd of politically aware techies, and it still costs a ridiculously cheap fiver to come along, and the talks were of an abnormally high quality.

Here are my thoughts from the day.

Farmification Of Factories

Fascinating talk from Lisa Ma about living and working with workers in a Chinese joystick factory.

Raises interesting questions about how we treat workers in terms of resources, and whether urbanisation is seen as a universally good thing by young people.
It got me to thinking about how we treat factory workers compared to how we treat animals. It's now a badge of pride for cosmetics to carry a label reading "Not Tested On Animals." Following the recent disasters in Bangaladesh, should clothes carry a "No Sweatshop Labour" tag?
Or, perhaps as Rob Manuel suggested, shops should publicly display how much tax they pay.


@ and a x% of purchase price will be paid as tax to HMRC label?
@robmanuel
Rob Manuel

Or even


@ print the CEO to employee salary ratio on the tags.
@alexstapleton
Alex Stapleton

There's a great interview with Lisa at VisionOnTV

Putting Your House on GitHub

What if you put all your niggling household issues on a bug tracker? Superficially, a very entertaining talk by Francis Irving - but raised a serious point about how we communicate with tradespeople.
Why can't I put a big list of jobs out to tender and let plumbers and electricians compete for my work?
I asked him about the security aspect of the project. In open source software, it's usually considered polite to raise a security bug in private before disclosing it to the wider world. You wouldn't want to raise a public bug which read "Burglar Alarm Broken", would you?

Constitutional Excerpts Project

Another great "what if" made real. What if you were to gather all the versions of countries' constitutions up in one place? What would a searchable database be like? What lessons can we learn?
Given that most countries constitutions change over time, and most changes are done by non experts in the field, this could be a very valuable resource.


This taxonomy of constitutional issues is anthropologically problematic. Relies on eurocentric assumptions. But totally fixable. #opentech
@blangry
Alex

It also touched on the limits of crowd sourcing from the general population. When very dense legal language is involved, it is usually best to get experts to decide what it means. Of course, that's also an argument for having laws written in plain and unambiguous language.

GOV.UK

The GOV.UK team have gone from a twinkle in the eye of some techies - to a fully fledged team kicking arse in the heart of the Civil Service.
Of particular interest to me was how they managed a complex redirection project as they closed various sites. Certainly not for the faint hearted.

Also interesting was the tales of some of the internal difficulties they faced. Including some "interesting" thoughts on Open Source.


CESG tech dir: "If anyone in UK government says CESG has banned open source send their name to me and I'll have them killed" #opensource13
@NickJHeath
Nick Heath

I asked an awkward question about their priorities. The DWP site only works on IE6! That means trying to claim benefits if you have a modern computer or browser (or even an old Mac or Linux box) is impossible.
The problem, as I understand it, is that contracts have been signed which mean making even simple changes comes with a high cost. As we've seen with PFI contracts in hospitals, the initial cost can seem attractive but outsourced companies with a strong profit motive will screw you over without providing any real benefit.

Another interesting question was asked about the "dumbing down" of content. Firstly, the pages link to the relevant legislation if you really want the nitty gritty detail. Secondly, nerds aren't average users. Average users tend to skim pages rather than reading them comprehensively. Given the average reading age in the UK is 12 (that's a hugely problematic statement, BTW) it's important that the information on the pages is as clear as possible.

I can't begin to describe how incredbly proud UK citizens should be at having such an amazing team reshaping the Government's digital portfolio.

The Bill and Gavin Show

Oh, look, just read Bill's talk and be enlightened.
Given that the punk music revolution is now being used to sell cars and butter, how do we stop the digital revolution from being hijacked in such a way? One suggestion is to "weaponize" openness. Can we have a "Creative Commons MAX" licence which promises extreme legal retribution for violators? Can we create Open Source licences which prevent evil being done in our name? I suppose GPLv3 is an attempt at that.

Gavin Stark's talk on Open Data gave me a thought about the ongoing issues with privatizing the PAF (that's the data which makes up the UK's PostCode system). Several years ago, I suggested that mutual ownership would be preferable to privatisation of the Post Office - could the same be true of PAF? Would enough techno-utopians be able to club together to run PAF in an open and sustainable way?

Bribing MPs

I've been thinking a lot about political donations and "political donations". It seems that some people are able to influence the legislative process by donataing modest sums of money, and giving favours to politicians. Other people would call for a database of lobbyists, or some form of push notification service for whenever your MP receives a bribe donation. Not me. I want to make a crowd sourcing site to help you influence your MP.

(Many thanks to Alex Blandford for the name suggestion.)
Yes, this talk is (mostly) humorous satire. I haven't really built "KickbackStarter" - although the mood in the room seemed of the opinion that it would be a viable idea. More than a few people came up to me afterwards and asked if they could help get it started. I think they're all crazy...

Permit me to indulge in some vanity over the feedback and photos I received.


@ is giving a great talk proposing KickbackStarter to donate to MPs 'when they vote the right way' #OpenTech http://t.co/mJzCIdpDby
@kevglobal
Mr Anderson


"Clicktivism doesn't work. Bribe MPs instead" #opentech http://t.co/JGdtRo1zME
@RDBinns
Reuben Binns


KickBackStarter - GLORIOUS. Let's stop funding failed campaigns and just 'gift basket' our representatives. #opentech http://t.co/HBqqUiGhLR
@nuttyxander
Alex Ingram


@ 's potentially libellous, audience-compromising talk about crowd sourcing political lobbying ( /bribery) Kickbackstarter! #opentech
@RDBinns
Reuben Binns


@ makes a fab point abt the nonsense of MPs and who runs the country. Now this is a question .. do MPs take Bitcoin #opentech #A5


.@ have you seen http://t.co/HPHQ33s4d6 for a related concept and proposed fix in the USA? #opentech
@DRMacIver
David R. MacIver


Delighted2c n hear Valued Patron of the Library @ 's awesome #opentech talk ... with this satire u r really spoiling us Sir!
@Librarian
Librarian


@ Your Kickbackstarter talk at #opentech yesterday was amusing educational and inspirational. Bravo sire. Bravo.
@faintdreams
Faintdreams

Essentially, clicking on petitions doesn't work. Emailing doesn't work. Protesting doesn't work. Cash and gifts work reliably.
Kickbackstarter - let's club together to influence MPs directly!

Thanks to VisionOnTV for conducting this interview with me.

Inclusive Issues In Technology - A Practical Guide

Only 17% of the STEM workforce is female. 2/3rds of female STEM graduates don't enter the profession. 50% of technology customers are female. See the problem?

Three very different speakers talked about how they were helping encourage more diversity in technology.

Firstly Stemettes is showing young women positive role models of women in science and technology. They're showing parents that their daughters can find a rewarding and useful career in computing.

Flossie is a project to get more women involved in the open source movement. They have a conference coming up in November. If you're a woman and want to present - give them a shout. Men are welcome at the event, but not as speakers. Given the aims of the project, I think that's fair enough.

Finally, Meri Williams gave perhaps the most informative talk of the event. Practical Diversity.

We hear a lot about how being a straight white male is like playing life on the easy setting, but this was the first time I'd seen someone talk through practical steps to include more people.

I especially loved her remark about tolerance. No one wants to be tolerated - you only tolerate things you hate. If you're talking tolerance, you're essentially saying "I dislike you and have to put up with you." No one wants that.

I highly recommend having a quick read of her deck.

Odds and Sods

One of the great things about OpenTech is that all the talks are audio recorded. I think, if possible, they should be videoed as well.

There were lots of people I knew - albeit some only digitally


Thirty seconds after arriving: "You're Jonty, I recognise your name from twitter!". I had forgotten #opentech is essentially internet LARP.
@jonty
Jonty Wareing

I wonder what the "newb" diversity is like. Are we just preaching to the choir?

Gender diversity of participants seemed much higher than a "normal" conference. Why is that? 10 speakers out of ~40 were female - perhaps that encourages more attendees. Or, is it the fact that the conference is cheap and held on a weekend?

Scheduling against both finales of Doctor Who and Eurovision was a tactical mistake ;-)

Huge thanks to Sam Smith and his merry band for organising. For all the speakers and attendees for putting such wonderful thoughts into my head, and to everyone who chuckled along at my jokes.

Same time next year? You bet!

On Swearing and UX Antipaterns

For the last few months, I've been curating a Tumblr of a very specific annoyance. I'll let Aral Balkan take credit for inspiring me.


Any modal message—full-screen or alert—that interrupts user flow to ask them to download your app suffers from #doorslam #ux antipattern.
@aral
Aral Balkan

First, a quick definition:

In software engineering, an anti-pattern (or antipattern) is a pattern used in social or business operations or software engineering that may be commonly used but is ineffective and/or counterproductive in practice.
Antipattern on Wikipedia

My tumblr is simply called "I Don't Want Your Fucking App".

It chronicles all those websites which - despite having a mobile web experience - are just desperate to get you to download their app. So desperate that they're willing to slam the door in your face.

Imagine, for a moment, that you are in a mall and decided to walk into a shoe shop. The assistant comes up to you and says "Good morning! Would you like to visit our website? It's so much better than our shop!"
How ridiculous would that be? And yet, that's what these websites do. They tell you to piss off and go elsewhere.

DoorSlam Collection

How It Should Work

Ideally, when a user visits your website, you should deliver the content to them in the most appropriate format. That's it.

If they're using Internet Explorer, you serve them up the correct CSS and JavaScript. If they're on a mobile device, serve them up the mobile or responsive version of the page.

If you do have an app, by all means let the user know - but don't take over the whole damn screen!

It really is that simple.

Apple have created an excellent way to create dismiss-able banners to promote your app.

When you throw up an interstitial, you're not only giving a terrible impression, you're also forcing the user to do more work than is necessary to get to the content they want.

The F-Bomb

Interestingly, the discussion on HackerNews focused mostly on the issue of swearing. Although I'm not usually one to swear for dramatic effect, I thought it would be amusing to have an over-the-top rant which over-uses swearing to the point of banality. It is, if you like, an exercise in over-reaction.

My sweary blog posts do seem to get the most attention. I wonder if it's because people are becoming too corporate. So worried about causing offence that their language becomes reduced to bland words that are calculated to be as emotionally neutral as possible.

I disagree with that mode of acting. I think it's perfectly acceptable be passionate and to let your language reflect that passion. Sure, the level of swearing that I've used is ridiculous - but it is employed to drive home the point. That's how I feel. That's how millions of us feel when we're confronted with repeated petty annoyances in our daily lives.

Swearing. It's not big, it's not clever, but it is authentic.