TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Making Cloud.typography Faster

79 pointsby csswizardryalmost 6 years ago

6 comments

andrethegiantalmost 6 years ago
Awesome post. I worked with cloud.typography for a client once too, and was surprised to discover that they shipped two base64-encoded data strings for each font, each one containing only one half of the font&#x27;s glyphs – that is to say, their CSS had two @font-face rules for each font: one that had the data for e.g. A-M, and the other that had data for N-Z. The `font-family` rules of the body text specified both FontA and FontB, leaving the browser to piece the font together. Of course, this made extra bloat in the base64 string, because it&#x27;s essentially two encoded font files instead of one.<p>I assumed this was for anti-DRM &#x2F; licensing purposes, so that if someone tried to download the font shipped to the client, they wouldn&#x27;t get the whole alphabet (even though it&#x27;s fairly trivial to stitch fonts together – you can use FontForge to copy&#x2F;paste glyphs from one font to another). Do you know if they still ship fonts with a split alphabet?
评论 #20708829 未加载
评论 #20711455 未加载
tux1968almost 6 years ago
That trick of marking a stylesheet for print media use only, and setting it for use with all media only after it is fully loaded, is very clever. Worth the read for that little gem alone.
评论 #20709277 未加载
social_quotientalmost 6 years ago
Great write-up on this topic. in the demo video near the bottom can you make the links to those each available. I tried to go to <a href="https:&#x2F;&#x2F;csswizardry.dev&#x2F;typography.com&#x2F;fixed.html" rel="nofollow">https:&#x2F;&#x2F;csswizardry.dev&#x2F;typography.com&#x2F;fixed.html</a> and am getting a page that says &quot;sneaky&quot; I was hoping to run these demos locally to really see the magic firsthand.
评论 #20708339 未加载
bytematicalmost 6 years ago
I love harrys posts, you can tell he really knows this stuff inside and out (plus we share an uncommon name). That font pop-in does such suck and I can see some execs agreeing that the extra time is worth the cost. I agree that the initial rendering being faster would be much nicer.
评论 #20709275 未加载
a_t48almost 6 years ago
Side note: This was really hard to read for me. The font was way too thin. Any vertical lines get smeared across three horizontal pixels (I assume because of subpixel AA) making everything thin and hard to parse. This is the second or third site I&#x27;ve seen this happen on, I wish I knew why.
评论 #20710708 未加载
qzncalmost 6 years ago
Not showing anything for 1.5 seconds is considered acceptable?
评论 #20708580 未加载