aliased font

Hello Scrivener users and developper.

I just purchased a nice eInk monitor, and Scrivener works great on it. It would be even greater if it was possible to choose to use aliased fonts. This is an option in the Terminal.app application on MacOS (Preferences -> text -> use aliased font).
The reason why I am asking is that on eInk a 1-bit depth mode is quite reactive. The only thing is that with such depth, non smooth fonts works best.

With kind regards.

Hi,

That option in Terminal (I assume you mean “Antialias text”?) only works for a very smalls subset of fonts. I assume it is using a hidden Apple preference that used to be available in the System Preferences prior to 10.9. Apple removed the global option in 10.9, however, and at the same time it changed text rendering internally across OS X so that there was no longer any difference between “screen fonts” and “printing fonts” so that text on screen would be rendered more smoothly across the board.

All of Scrivener’s text rendering is handled by Apple’s drawing systems, and there are no options in code to change antialiasing for fonts these days. As I say, my guess is that Terminal is using an old hidden Apple preference, but it’s not something Apple publishes for other developers to use.

All the best,
Keith

Hi Keith

Thank you for your timely response.
However, I do not think I agree with you. On macOS, to enable or disable antialiasing in a particular graphical context is very easy, it suffices to use

CGContextSetAllowsAntialiasing(context,true or false);

Here is a project demonstrating rtf display without anti-aliasing :

dropbox.com/sh/4wszwp9e1lv7 … KmKPa?dl=0

One just needs to compile, run, and open whatever rtf file.

all the best

That project is not really relevant, as it’s an example of drawing rich text using CoreText - a very low level way of doing things. Scrivener doesn’t use CoreText. It uses Apples TextKit for all drawing and editing. (Apple no doubt use CoreText for this deep down, but that is at a much lower level than Scrivener goes.)

A quick search reveals a couple of examples of projects with an NSTextView’s -drawRect: method overridden to call CGContextSetAllowsAntialiasing() before calling super’s implementation, in order to apply this to an NSTextView (Scrivener uses a heavily subclassed and modified version of NSTextView). I’m sceptical about how effective this would be, however, given that Apple’s drawing methods could easily override these settings deeper down. Also, Apple’s documentation for NSLayoutManager (the object responsible for actually drawing text inside an NSTextView) states that antialiasing is already turned on anyway. So if text is not rendered as nicely as you would like on an eInk monitor, it may just be that Apple’s text system (not its CoreText drawing component, but the full TextKit component) is not yet optimised for such drawing.

I have put together a quick app so that you can test this for yourself, however, seeing as I do not have an eInk monitor on which to test myself. Attached is a simple app (TextViewAntialiased.app - unzip the attachment). On the left is a regular text view. On the right is a text view that has CGContextSetAllowsAntialiasing() applied to its drawing methods. I can see no difference between the two on either a regular or Retina display, but perhaps there is some difference on your eInk monitor. Please put the same text in both text views and check, and upload a screenshot to show if they are different.

All the best,
Keith
TextViewAntiAliased.zip (39.3 KB)

harmonicholas–

If you don’t mind me asking, WHEREVER DID YOU GET AN EINK MONITOR? I’ve looked everywhere for one, but the few I could find were either kickstarter projects, or made by hobbyists who retrofitted their kindles with some linux distro.

yosimiti

Hello Keith
Thank you for your app. On the eInk monitor, there are no differences as well.
I will investigate the matter further in a month.

all the best

Yosimiti
I don’t think I am allowed to quote directly commercial companies.
But indeed, it’s an indiegogo project. just type eink monitor in google, and you will find it.
kind regards

You are completely allowed, but thanks anyway.

harmonicholas–

I’ve always wondered, how does one buy products showcased on crowdfunding websites like IndieGoGo or Kickstarter? I’ve always been a little timid about approaching these sites, as I guess these products don’t have warranties, and one is taking a risk I guess in making these purchases if one is even allowed to make them.

By the way, if your timid about talking about this type of subject in this thread, feel free to send me a PM if you can. Just so that you know, the only reason why I’d be interested in getting an e-ink screen is to run Scrivener on it. So as far as I’m concerned, it’s completely Scrivener-related.

Yosimiti–
Well, so you will all know, yes, it’s a Dasung eInk monitor. I think indiegogo is reliable. I had no issues whatsoever with that site.
Dasung is also very good. They respond very speedily, they shipped the product, it works, no surprises.
Indeed, very little is said about a warranty in the manual, however, there is a phrase where they refer to a “free warranty”.
Anyway, I cannot reasonably expect such a new product to last long. Current eInk technology cannot handle frequent pixel switching well.
But I enjoy very much the monitor ! It is such a pleasure to write on it, particularly in open air.
There are a few things to be polished with the mac driver. It seems that the window version is more mature. I wish they would distribute a linux driver as well.
On the mac, the 16 grays mode is gorgeous, but too slow to be practical in my point of view.
Black and white mode is just usable.
They also made a 5 grays mode which is about as fast as B&W mode.
Once again, I think they optimised the driver better on windows.

best

Yeah, I think I ‘evolved’ somehow to grow accustomed to reading long texts off my computer screen simply because I was and am forced to at university. Once I realized that it was possible, and this whole eye-strain fatigue was all in my head (at least for me – can’t say it’s the same for other people) it kinda obviated the need for a Kindle. These days, I read Shakespeare pretty fly off my computer screen, so if I can do that, I think I can do anything, and thus don’t need an e-ink screen, unless they somehow make the experience as fast and as colourful as OLED or 4K resolution (something I don’t think is going to happen anytime soon).

My hope, though, in the very least, is for Apple to come back to matte/anti-glare screen displays as the current ‘let’s-make-everything-as-glossy-as-we-can’ attitude really is silly and puerile. Monkeys like shiny things, it’s true, but we’re human, aren’t we?