https://bugs.documentfoundation.org/show_bug.cgi?id=69254

--- Comment #40 from Tor Lillqvist <[email protected]> ---
To ikjt in comment #39:

It seems that what CoreText actually gives us is a floating point number
between -1.0 and 1.0, with 0 being the "normal" weight. See
https://developer.apple.com/documentation/coretext/kctfontweighttrait

That is then turned into LO's FontWeight enumeration (in
include/tools/fontenum.hxx, which does have a relatively nice collection of
named weights:

> enum FontWeight { WEIGHT_DONTKNOW, WEIGHT_THIN, WEIGHT_ULTRALIGHT,
>                   WEIGHT_LIGHT, WEIGHT_SEMILIGHT, WEIGHT_NORMAL,
>                   WEIGHT_MEDIUM, WEIGHT_SEMIBOLD, WEIGHT_BOLD,
>                   WEIGHT_ULTRABOLD, WEIGHT_BLACK

(This enumeration is the weight I mentioned in comment #38, 3 == WEIGHT_LIGHT.)

Some debugging output:

> debug:33677:25401597: ===> Overpass: Light: w=-0.4
> debug:33677:25401597: ===> Overpass: ExtraLight: w=-0.5
> debug:33677:25401597: ===> Overpass: Thin: w=-0.5
> debug:33677:25401597: ===> Overpass: Regular: w=0

So Light should be distinguishable from ExtraLight or Thin, but ExtraLight has
the same weight as Thin, so distinguishing between those would be harder.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to