Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Странные значения weight и style в ttf #2

Closed
alexeyten opened this issue Mar 30, 2022 · 6 comments
Closed

Странные значения weight и style в ttf #2

alexeyten opened this issue Mar 30, 2022 · 6 comments

Comments

@alexeyten
Copy link

alexeyten commented Mar 30, 2022

Вот такие веса показывает fc-scan (fontconfig) в Ubuntu

$ fc-scan --format '%{file}\t%{weight}\t%{style}\n' MartianMono-Std*.ttf
MartianMono-StdBd.ttf	200	Std Bd,Bold
MartianMono-StdLt.ttf	80	Std Lt,Regular
MartianMono-StdMd.ttf	80	Std Md,Regular
MartianMono-StdRg.ttf	80	Std Rg,Regular
MartianMono-StdTh.ttf	0	Std Th,Regular
MartianMono-StdxBd.ttf	205	Std xBd,Regular
MartianMono-StdxLt.ttf	80	Std xLt,Regular

По документации я бы ожидал для
Lt — 50
Md — 100
xLt — 40

Ну и style у всех почему-то Regular.

@alexeyten alexeyten changed the title Странные значения weight в ttf Странные значения weight и style в ttf Mar 30, 2022
@romashamin
Copy link
Member

romashamin commented Apr 2, 2022

Поресёрчил проблему.

Glyphs, как будто бы, действительно не всегда правильно задаёт параметр usWeightClass:

image

Я уже написал о проблеме разработчику. Разбираемся.

@romashamin
Copy link
Member

По документации я бы ожидал

Не понимаю откуда берутся 50 для Light, 80 для Regular и 100 для Medium.

В спецификациях OpenType и CSS для тех же классов предполагаются 300, 400 и 500.

@alexeyten
Copy link
Author

Возможно freetype их как-то сам матчит. Во всяком случае для остальных файлов он показывает правильные значения.

@romashamin
Copy link
Member

Проблема обнаружена, со следующим апдейтом будет фикс.

@alexeyten
Copy link
Author

А значения style тоже поправятся?

@romashamin
Copy link
Member

FIxed in 0.9.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants