Archive for April 14, 2021

Wednesday, April 14, 2021

Dynamic Type and In-App Font Scaling

Daisy Ramos:

This is all that’s needed to scale custom fonts with Dynamic Type. Sometimes in content-driven apps there is a need for web technologies for complex layouts / styles. Let’s see if we can support Dynamic Type and web-driven content via WKWebView.

Jeff Verkoeyen:

For iOS 12 and 13 there’s a scattering of iOS bugs and unexpected behavior that result in a windy road toward a swiss cheese of dialed in fonts, but it kind of works for common cases. You can see the different considerations in [this gist].

ThinkPad X1 Nano

Monica Chin:

But one thing is unique about the X1 Nano: it’s the lightest ThinkPad Lenovo has ever made. Starting at just 1.99 pounds, the Nano isn’t technically the lightest laptop on the market. But it’s still one of the best combinations of portability, build quality, and performance that you can buy.


What looms over that verdict, of course, is the Nano’s price. Technically, it starts at $2,499 and maxes out at $3,719. The good news is that Lenovo’s products are very often heavily discounted, and the current sale prices at the time of publish range from $1,149 to $2,231.

Via John Gruber:

An M1 MacBook Air weighs 2.8 pounds (and an M1 MacBook Pro weighs just 0.2 pounds more — the Air is only ever-so-slightly lighter than the 13-inch Pro).

How about this? My 11-inch iPad Pro attached to Apple’s Magic Keyboard: 2.36 pounds. Lenovo’s X1 Nano even has that beat on weight, and the ThinkPad has a 13-inch display and full-size keyboard.


Blocking Discord Channels Marked NSFW on iOS

Jacob Kastrenakes (tweet, Hacker News):

Discord is amping up its restrictions on adult content, with new age gates on NSFW servers and a ban on accessing these servers from iOS devices.


The NSFW marker does two things. First, it prevents anyone under the age of 18 from joining. But the bigger limitation is that it prevents NSFW servers from being accessed on iOS devices — a significant restriction that’s almost certainly meant to cater to Apple’s strict and often prudish rules around nudity in services distributed through the App Store.

No such rules apply to groups conversing via iMessage or FaceTime.

Kyle Orland:

Apple’s iOS Developer Guidelines say that apps with user-generated content “that end up being used primarily for pornographic content… do not belong on the App Store.” The guidelines allow for “incidental” NSFW content generated by users on web-based services if “the content is hidden by default and only displayed when the user turns it on via your website,” a caveat that apparently isn’t sufficient for Discord’s comfort.

My recollection is that enabling it via a switch in the app, or based on the iOS parental controls settings, is forbidden.

Discord is reportedly in the late stages of acquisition talks—which could value the service at $10 billion—with Microsoft and other parties. The service has over 140 million monthly users and 300 million registered accounts.


Every small community I’m on on Discord (meaning the majority of the servers I regularly interact with) sets every channel to `NSFW`, and some mark the server itself. They do this because everyone involved is known to be 18+ (Usually higher than that) and they want to be able to have the same discussions they’d have in person.

These communities are not about porn, are not about anything “distasteful”, but the flag is set there so that if a topic comes up we can discuss it without risking a ban.

In other words these communities are meant to be a Third Place, or an extension of a physical Third Place, particularly recently thanks to COVID.

The content here is literally no different than the content that could show up in a long-running group chat in the Messages app on iOS.

Matthew Bischoff:

When we dealt with this at Tumblr, it became my full time jobs for weeks to find incredibly complex ways to appease Apple’s censors. This happened every time they found a sexy blog they didn’t like. It’s absurd.

Ian Vanagas (via Hacker News):

The competition between internet communication platforms is fierce. Discord wasn’t early to voice channels or group chats. They weren’t unique for targeting their offering to gamers. Other platforms have the same features as them. Yet they are a multi-billion dollar business. How? To borrow an idea from Sarah Tavel, they built a 10x better product AND capture more value from it.


Update (2021-04-15): AAPL of Discord:


Update (2021-04-16): Nick Heer:

Speaking of Twitter, that company expressly permits “graphic violence and consensually produced adult content” within users’ tweets “provided that [users] mark this media as sensitive”. Reddit permits NSFW text and media so long as it is marked. Discord has a similar policy of allowing NSFW media in channels so long as those channels are marked. What makes it different? Is Apple going to demand that Reddit and Twitter also prohibit accessing NSFW media from within those companies’ iOS apps?

Update (2021-04-22): Sarah E. Needleman and Cara Lombardo (via Hacker News):

Chat startup Discord Inc. has halted talks to sell itself to potential suitors including Microsoft Corp. , according to people familiar with the matter, as it resumes interest in a potential initial public offering down the line.

Big Sur Has Changed How macOS Formats Time

Howard Oakley:

A number of those using my free utilities Ulbow, Mints and T2M2, and possibly others, have recently noticed a bug which prevents them from obtaining any log extracts. When you try to get a log extract or, in T2M2, to run a check on Time Machine, you are shown an error dialog reporting that

log command returned an error number 64


The reason for this occurring is that, contrary to the scant documentation which Apple provides, when the system clock is set to display time using a 12-hour clock rather than 24-hours, log show now formats all its timestamp fields (field 0, timestamp) using a 12-hour clock and AM/PM as appropriate.

I have no earthly idea what possessed Apple to make this change, nor why it hasn’t made this clear in its release notes. However, if you parse or analyse log entry timestamps, it breaks that completely.

Howard Oakley:

Formatting like yyyy-MM-dd HH:mm:ss isn’t defined by Apple, but conforms to Report TR35 from the Unicode Consortium, and is exhaustively defined here. That makes it clear that setting the hour using HH returns the hour in 24-hour format, ranging from 00 to 23.

Yet when a Mac is set to use 12-hour format, that rule is broken: the hour is returned in h format rather than HH, as unpadded digits between 0 and 11, or maybe even 1 and 12. Furthermore, the am/pm value is being added to the string.


Sure enough, adding the line dateFormatter.locale = Locale(identifier: "en_US_POSIX") to my code restores respect for my formatting.

Howard Oakley:

The advice given is vague and raises more questions:

“if you’re working with fixed-format dates, you should first set the locale of the date formatter to something appropriate for your fixed format. In most cases the best locale to choose is “en_US_POSIX”, a locale that’s specifically designed to yield US English results regardless of both user and system preferences.”

How do we tell if our specific case is one of those “most cases”? What other effects might that setting have? If someone has set their Mac to run in Danish, should we be using something other than a US English setting here? But above all, why on earth would Apple change “in unexpected ways” a fixed format to something unspecified of its own invention which flies in the face of Report TR35? Just why is it impossible to follow the prescribed format string?


PyCharm’s Transition to Apple Silicon

Nafiul Islam (via Hacker News):

With the deprecation of Java on the Mac, certain things such as font-rendering on retina screens became more difficult using the version of Java that Oracle released. In order to remedy this, JetBrains forked the OpenJDK project in order to facilitate better control over how the IDEs looked on Macs a well as other HiDPI screens; JetBrains Runtime was born and we bundled it with our IDEs from 2014.


The change to Apple Silicon meant that we’d need to re-write a lot of JetBrains Runtime, to make sure that we had adequate performance.


It soon turned out that we had to re-write a lot of the JIT system, a core component of the JVM itself, which was something we had little to no experience in.

Eventually, we did manage to solve this issue with the help of Azul Systems. To hear the whole story, listen to the podcast, where I talk to Konstantin Bulenkov, who had to weather the storm of this fundamental change.

The podcast episode is here.