Posts

Scaling SVGs without scaling their strokes

A forewarning: Unfortunately, I am going to share a roadblock I ran into, rather than a solution. I am sorry if this post is a bit of a downer.

Recently, I was working on a website for a client that included vector images of maps. The maps look something like this. These are vector maps in a line art style, where the maps appear hand drawn.

Here’s an example design with the map, so you can see what I’m working with:

An screenshot of a website mockup. The website mockup has map outlines on both the left and right side, with text in the centre. The text says: "We're on a mission to share Jesus with every home. We provide strategies and easy-to-use resources in printed and digital formats that Christians can use to present a gospel message to others, where they live and where they go. Learn how we do it."

What I wanted to do was place an inline SVG on the page, then scale its size along with the page itself. So I wrote code like this:

svg.map {
	display:block;
	margin:0;
	width:100%;
	height:auto;
}

You know, your bog-standard CSS.

This works as expected: the SVG scales along with the width of the page, and the aspect ratio of the SVG never changes. (The aspect ratio in this example is not a known quantity, and the client could change this map at any time to a different location.)

Here’s the problem: as the SVG scales, the strokes in the SVG scale as well. On a phone, the map looks correct: 1px strokes surrounding each country. On a desktop, it looks ridiculous: the strokes are 20px wide. It’s as if somebody drew the map with a highlighter.

To fix this, I turned to vector-effect — in particular, non-scaling-stroke. As always, the MDN Web Docs page is very helpful.

Here’s the problem with non-scaling-stroke: It only seems to work if you scale the SVG with transform="scale(X,Y)". It has no effect if you are merely resizing the SVG with CSS.

So this code does not work:

<style>
svg.map {
	display:block;
	margin:0;
	width:100%;
	height:auto;
}
</style>

<svg viewBox="0 0 500 240">
  <path
    vector-effect="non-scaling-stroke"
    d="M10,20 L40,100 L39,200 z"
    stroke="black"
    stroke-width="2px"
    fill="none"></path>
</svg>

Instead, the path must look like the following:

<path
	vector-effect="non-scaling-stroke"
  transform="translate(300, 0) scale(4, 1)"
  d="M10,20 L40,100 L39,200 z"
  stroke="black"
  stroke-width="2px"
  fill="none">
</path>

This was a huge disappointment for me, and for a few peers I ran this problem by. We all expected my solution to work because nowhere in the documentation does it say that scale is required.

Either the documentation needs to get updated, or vector-effects intended use needs to become more robust.

Oppenheimer and the reason movie theatres are disappointing

I finally got tickets to see Oppenheimer in 70mm IMAX later this month. I’m excited about seeing a theatrical presentation on film, which is a surprising rarity in Canada these days.

Over the past few years, I’ve gone to the theatre less and less often. Less than a decade ago, I was going once every week or two. This year, I’ve seen a handful of releases (we saw Barbie twice), but we often strategically wait to see something when it releases on home video.

The reason for this is simple: outside of sheer size, most modern TVs are better than theatres in every object measurement. My wife and I are fortunate enough to have a surround sound system in our home, and we have a big 4K HDR OLED TV in front of our couch too. The visual experience (size of the screen notwithstanding) is much better than what you can get in most theatres.

Most movie theatres, including Premium Large Format screens, do not project in HDR. They can’t. Projector bulbs can’t get bright enough. Some laser projectors can get in the ballpark, but they’re exceedingly rare. (If you live in Toronto, the Scotiabank IMAX theatre has a dual laser 4K projector that is very bright. That being said, the last I heard was that the theatre was due for demolition so they can build condos there instead, so enjoy it while you can.)

Because the projectors are so dim, they are only projecting standard dynamic range. They often project a 2K version of the film (just above the resolution of 1080p). If you’ve ever sat up front at an older theatre (perhaps one built before Avatar came out), this is why you might have noticed pixellation.

The cameras that filmmakers use to make movies, though, shoot in HDR. It’s not a feature they need to enable. They simply capture more dynamic range than a theatre can support.

A high-end cinema camera might capture seventeen stops of exposure. Your average SDR presentation can present three of those seventeen stops. A digital presentation in SDR is prepared to show you everything within those three stops, and any other information is jettisoned from the image. (This is why studios are eager to re-sell you films you already own in HDR — this is the first time they’ve been able to present the whole negative.)

For a lot of films, this isn’t as big a problem as it might sound. Good cinematographers are aware of the limitations of film production, and use a lot of lights to make sure that the dynamic range in their presentation is not beyond what most screens can show. (Roger Deakins, who has shot films like Skyfall, Blade Runner 2049, and Sicario, is amazing at this.)

But there are advantages to a wider range of presentation for any film. Jaws is a perfect example: it doesn’t have a huge dynamic range, but there are still lots of reflections of the sun on the water, and it’s nice that those reflections can get brighter and more like what you’d see on celluloid. Lawrence of Arabia was shot in the desert for a year, in gruelling conditions. It’s a very bright film. It’s wonderful in HDR, simply because it benefits from the wider dynamic range of that presentation.

For that reason, I can tell you Barbie is going to look wonderful in HDR too. Both my wife and I immediately recognized that some shots in Barbieland looked almost underexposed in both screenings we saw. I am certain that they had to compress the range of these sequences to preserve the highlights in the sky. Skin tones are a little darker on occasion, but unlike the real world, which is grey and dull in Barbie, Barbieland is always bright and colourful, and the sky is always lit up like a rainbow. It’s going to look great in HDR.

Back to Oppenheimer: After years of watching things on our HDR TV, I’m excited to see a real film projected on a big screen. The film reel can support a wider range of dynamic imagery than a digital SDR presentation, which I imagine is going to shine, particularly in the black and white sequences.

I’ve been disappointed in theatres for years. When film directors talk about how you need to get to the theatres to see their films, I think most people roll their eyes. But that’s only because the current method of theatrical presentation is so far behind the advancements in home cinema that, for most of us, there really is no reason to go to the theatre unless we need to see a movie the second it’s available.

My hope is that Oppenheimer in IMAX 70mm is a noticeable improvement. I’ll report back after I see it.

Library bans in Mississippi

Via Austin Kleon’s newsletter: Overdrive/​Libby, a digital service that lets you take books out from your local library electronically, has been banned in Mississippi for those under 18. (The age of consent is 16, if you’re wondering.)

Texas is next.

If any Canadian politician tries this, I will write so many letters and make so many phone calls they won’t be able to ignore me.

Think about the children” continues to be one of the finest sentences ever constructed for the purposes of advancing fascism.

The new PRS NF53 and Miles Kennedy signature guitars

Yesterday, PRS introduced two long-rumoured Telecaster-style guitars: the NF53 and the Miles Kennedy model.

The NF53, to my ears, is the better sounding instrument. The Nearfield pickups sound very much like the single coils they’re voiced after. PRS has said the guitar is based on a vintage 1953 instrument in Paul’s collection (read: Telecaster). There’s a clarity in this guitar’s sound that is pure and intoxicating. I’d love to trial one.

From other videos (see the Peach Guitars one below), this thing really starts to roar once it gets a bit of gain. It’s the classic Tele sound.

The Miles Kennedy model is extremely interesting. I’m not sure how I feel about it. I think it sounds great for Miles’ needs in Alter Bridge, where he’s competing with Tremonti’s very beefy rhythm tone. The features are cool: a 5‑position pickup selector with split and humbucking sounds, as well as a push/​pull tone knob that PRS says cuts the high frequencies in half in pickup positions 2 – 5 for high-gain rhythm sounds.

To me, the MK model sounds a little closer to a Les Paul. Out of the gate, I’m not sure I’d want one, but it seems like their pitch is that this is a guitar that cuts in a mix in a band situation. So does a normal Telecaster, but clearly they’re pushing the MK towards those of us who would otherwise gravitate to a more traditional dual humbucker body. I’d love to try one.

That NF53, though… oh boy. 

As usual, Peach Guitars has put together a terrific demo of both instruments:

The elephant in the room is the price: in Canada, it’s $3900 for each instrument. That’s more than I paid for my Ultra Luxe Telecaster, which was laughably expensive.

Gear Patrol acquires DPReview

I don’t get to use my camera gear a lot anymore — the days before COVID when using my camera felt like a near-daily part of my work are very missed — but I am grateful to hear that Gear Patrol has acquired DPReview, and the site will live on. 

Much digital ink has been spilled about DPReview in the past months, and I won’t add much more to it here, save that the site has always been invaluable. It’s not just about gear. It’s about learning technique from the good people in the forums, too. Losing DPR would have been like losing Sound on Sound for music production — unthinkable. 

Gear Patrol is new to me. I hope they steward DPReview well.

Design is hard in the middle

I’ve always found the work of design to be difficult. 

When I started working as a designer, it was difficult because I didn’t know what I was doing. I was tripping and stumbling in the dark, messing around in Photoshop and InDesign, trying to lay out magazine ads and technical manuals proficiently. I don’t think the work was particularly good; I may have had good taste, but I lacked the required skills to get there. 

Now that I’ve been working as a designer for over nine years — ten in October! — the primary challenges are different. As I get older, the blank page becomes more daunting, probably because I don’t want to repeat myself. I’d rather be like George Carlin and come up with new material for every project. But even once we get passed the blank page (try pen and paper first), the middle — the process — is hard. Design is not a straight line.

Good design resources about the process are scarce. I assume every designer struggles with this (especially post-COVID, when so many work alone from home with less immediate feedback), but none of us share the struggle in the messy middle. We just share the beautiful end results in our portfolio. 

In that respect, design is an odd creative field. Authors love to write books about their writing process. Filmmakers make documentaries exploring their craft. Musicians release demos as bonus tracks. But designers don’t share the process. We hide it like it’s some trade secret. Even Dribbble, ostensibly a platform where we can share what we’re working on,” is mostly used to share work we’ve finished.

The process is ignored.

My favourite video on the internet is Aaron Draplin taking on a logo challenge from Lynda (now LinkedIn Learning). I watch the video every time I get stuck, so I’ve seen it a few times: Draplin makes jokes, draws freely, zips around Adobe Illustrator and, most importantly, talks about all the cool stuff he has lying around his workspace.

The first several times I watched the video, I was amazed by the amount of junk Draplin collects (and worried that a key part of success as a great designer would involve becoming a pack rat). But I eventually realized that Draplin isn’t collecting these knickknacks; he’s noticing them. That act of noticing – of focused observation – is his process.

I think we as an industry could do a better job sharing how we work. A few years ago, I audibly groaned when a friend who was new to the design industry asked if I preferred Sketch or Figma. (I was kind of a jerk, I know. Dear friend, if you’re reading this, I’m sorry.) That question isn’t particularly interesting to me, although I think the evolution of our tools and the impact they have on us is worth watching and considering.

The questions that I think are most important: how do we do the work? How do we create focus? Where do we get our inspiration from? How do we survive the middle?

The tools and the output

For years now, we’ve heard new conventional wisdom from all the creative gurus: the tools don’t matter. You have everything you need to make what you want to make.”

It probably won’t be surprising to long-time readers of this site that I feel the opposite is true. The tools reveal the process, or at least imply our process. There is no right or wrong tool, so much as there are right or wrong tools for us.

No tool makes you better at your job, but the good ones make your job better. If you do high-end work with computers, a fast computer will always be a good tool. The right kitchen tools make cooking easier, or at least more fun. A good desk chair literally saves your body. Any tool that motivates you to do more of the thing you love has value.

George R.R. Martin does all his writing (very slowly) with DOS word processor. Specifically, he uses WordStar 4. That looks something like this. One could make an argument it’s not the best tool for the job. But it’s his process. The tool merely reveals his priorities.

On the other hand, tools that get in the way have no value at all. I recently auditioned Sketch for the first time in years. Since 2019, I’ve used Figma with all my clients. In 2019, these apps were quite similar, but since then, Figma has completely leapfrogged Sketch. Things that used to take me ten minutes to do in Sketch take ten seconds in Figma. This audition was incredibly revealing of how the tools have changed, how my process has changed, and how my work has changed.

But it got me thinking: does the tool change me? Does it change my output? Are all my designs just huge Auto Layout demos?

Constraints breed creativity. What do the tools breed in us?

A swipe file for digital designers

Copywriters have something they call a swipe file — a place they store bits of marketing and writing material they want to refer to later for inspiration. Austin Kleon’s Steal Like An Artist Journal includes its own swipe file.

Commonplace books have a similar idea: it’s a place to store your favourite stuff other people make. H.P. Lovecraft kept one. Ryan Holiday called his a project for a lifetime.”

You have to make your own wells of inspiration.

For many years, when I saw designs I liked and wanted to save for later reference, I would use Pinterest to save it, or simply take a screenshot and stick a copy of it in my Mac’s hard drive somewhere. (The latter is a much better solution than the former.)

Of course, a screenshot isn’t really enough. A good swipe file tells you where your inspiration comes from. It should include notes. Maybe even a full taxonomy. At that point, your basic file browser ain’t going to cut it. There’s no way to serendipitously discover things in the Finder.

These days, I like using Eagle, a macOS app that does a great job organizing all the visual media it saves. With support for everything from pictures to videos to full webpages, I think the app is a godsend. I was suspicious of it at first, mostly because it seemed to good be true, but it has survived three computers and a silicon transition without losing a single image, so I’m pretty confident in it these days.

It’s unfortunately Mac only, but it’s a darn good Mac app (if you like Mac-assed Mac apps). If you’re a Windows person or love your iPad for this sort of thing, I can’t help you. But I’d love to hear what you use.

One Story case study

I’ve been so busy with work since COVID that I haven’t had time to update my portfolio. I’m trying to make time to fix that now.

The newest case study in my portfolio is about One Story, a website I designed and developed about a church curriculum for kids and youth. It’s chalk full of images and details about the project. Check it out here.

A collection of iPads laid out isometrically. Each one has a different screenshot from the One Story website on them.

Preventing typographic widows with CSS

Richard Rutter shared an idea for limiting typographic widows with CSS. I love the simplicity of his proposal and would be thrilled if something like this were implemented as part of the core spec.

Food for the creative soul

Twelve years ago felt like a golden age for indie bloggers. Shawn Blanc had just gone full-time independent and was writing up a storm. Austin Kleon posted the slides that ended up becoming *Steal Like an Artist*. The Great Discontentposted their first interview (with Dan Rubin). The Verge was still called This is My Next. John Siracusa was still writing 50,000 word macOS reviews.

The community was growing behind the web, too. Frank Chimero wrote a lot more then, and eventually a lot of what he wrote became The Shape of Design in 2012. Also in 2012, Kai Brach crowdfunded the first issue of Offscreen Magazine.

Maybe this is nostalgia. In 2011, I started freelancing and was actively seeking my tribe. For me, it was a magical time to be online. TGD was how I heard of all the designers I count now as inspiration. It gave me the confidence to explore my path. And Shawn Blanc quitting his job to blog full-time was an aha moment for me. Austin Kleon shone a light on how to do your best creative work (and continues to do so; he’s the best). Frank and Kai proved that there was still space and interest in sharing something deeper and more philosophical online.

Is there a community of people like this in 2023? Who is today’s Shawn Blanc? Who else is shining a light like Austin Kleon?

The newest additions to my list of must-read bloggers are Matt Birchler and Nick Heer. But I’m still looking for the next generation of creative pros and artists who remind us why we get up every morning and make stuff.

Who’s making food for the creative soul?

My next Apple computer

Before the Apple Silicon transition, it was always the case the biggest MacBook Pro was the most powerful. That’s no longer the case. These days, 14″ MacBook Pro can be specced out to be just as powerful as its bigger sibling. 

Without considering the implications of this, I purchased the 16″ MacBook Pro last year — the biggest one available — out of sheer habit.

Next time, I’m getting the 14″. I want as much power as I can get, but when I’m portable, I want as much portability as possible.

When a design is in doubt

When in doubt, the answer is simple: reduce, reduce, reduce.

Didn’t Dieter say the best design is as little design as possible?

Probably still true. Probably true of words too.

(Edited for brevity.)

I’m still here

I’ve been thinking a lot about writing more often — doing something like what Austin Kleon does, or what he used to do: frequent updates about what I’m working on and thinking about, giving away whatever knowledge I have for free, and linking it all together with some sort of meta-textual awareness.

Post-Twitter, it seems like the best sort of thing to do with a personal website: write personal thoughts, sometimes using more than 280 characters, and link them together. Sometimes add links to things outside of this site too. Share it all for free, in the tradition of the open web (none of this paid newsletter stuff, lest suddenly I do this as a job and begin to despise it).

Of course, as soon as I thought about it, I started thinking about the forever-unfinished state of this redesign. Despite starting work on it during the early days of the pandemic, I never found time or motivation to finish it. It felt too much like work, and I was already up to my ears in work. I assumed that it would slow down at some point, but it never did. (An amazing predicament to be in as a freelancer.)

And so the site sits unfinished, and I feel unable to participate in my own work as I once did.

I don’t like Wordpress. It’s open source, but it also lacks direction, and I disagree with almost every direction it’s taken in the past half a decade. I’d prefer something Markdown based, so I can write on my computer, run a quick script from the command line, and be up and running. But I also want the flexibility to create complex structure if I need it. (I keep thinking I may one day want to share my photography work on the site, and that would require its own design and post type, so I do want to some flexibility.)

Some options:

  • Grav
  • Statamic
  • Craft CMS (I think Craft is the best CMS in the world right now, but I wouldn’t be able to use flat files at all if I took this approach)
  • Kirby
  • Ghost

Leaning towards Craft or Kirby at the moment, but neither of them really match what I’m looking for. Obviously I could use Jekyll or any of its descendants, but something about that approach holds me back. I think it’s great they support plain text so well, but my site may end up being more rich than mere static text would allow.

In the meantime, I’d like to keep writing here. The work of the site is the text itself, not the container surrounding it. As much as the web designer in me hates to admit it, carrier pigeons have delivered more important words on paper with much less design.”

Further Sketch news in Figma’s world

I was saddened to hear about layoffs at Sketch. No company deserves to suffer layoffs, and certainly not a company that has done so much for its industry as Sketch. If you’re hiring, it sounds like the 80 people they’re letting go would be great for your team.

After Adobe bought Figma, I suggested to a couple different teams I freelance with that we could try Sketch again for our workflows. I’ve been impressed with their marketing efforts since the Figma acquisition (sadly it sounds like the marketing team is who they’re letting go of), and I miss using a Mac-native design app. 

Sadly, I think this ship has sailed. None of these developers are in love with Figma, and all of them hate Adobe, but Sketch being Mac-first immediately ruled them out for the teams I’m on. I wish Sketch took the Affinity route: build an amazing Mac app, and then build out native Windows and iPad versions. That could have made Sketch an unbeatable proposition in an increasingly tool-agnostic world.

It’s Figma’s world now. And in Figma’s world, it’s hard to beat ubiquity.