Access Font Weights in theme.less


#1

I’ve been playing around with the theming through LESS css. One question I have is about support for font-weights. I’ve been using “font-family” together with “font-weight” to access various weights, but it seems each time Taskpaper selects the heaviest weight and ignores the number “100, 200, 300, 400, 500, 600, 700, 800, 900”.

It would be really great for styling purposes to be able to use different weights for projects, notes and tasks. Has anyone gotten this working?


#2

It doesn’t use web values for that instead it uses some values from the Cocoa font system.

See:

https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSFontManager_Class/#//apple_ref/occ/instm/NSFontManager/weightOfFont:

0 indicates the lightest possible weight, 5 indicates a normal or book weight, and 9 or more indicates a bold or heavier weight.


#3

Thank you for such a quick reply. I’ve been testing this new scale with some success. Numbers >4 seem to work, but anything below seems to be ignored. Resulting in no access to weights below regular such as semi lights and lights.