vscode: OTVAR fonts: fontWeight/wght conversion fails
Issue Type: Bug
Expected: editor.fontWeight will reproduce the wght setting of the font, 1-1000.
Errors:
- Currently, only instance steps 400, 500, 600, 700, 800, 900 are supported, but steps outside this range (1-300 and 1000) should work to according to OT Spec for wght.
- All values are currently rounded to full hundreds, which defeats the purpose of variable fonts. For example, editor.fontWeight=650 will yield wght=700, but should yield wght=650.
VS Code version: Code 1.68.1 (30d9c6cd9483b2cc586687151bcbcd635f373630, 2022-06-14T12:52:13.188Z) OS version: Darwin x64 21.5.0 Restricted Mode: No
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 (8 x 24) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled |
| Load (avg) | 3, 36, 27 |
| Memory (System) | 16.00GB (0.03GB free) |
| Process Argv | –crash-reporter-id eacbd859-6fed-4522-ad9e-69485b4219d2 |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333
vscaac:30438847
vsclangdc:30486549
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 20 (12 by maintainers)
Commits related to this issue
- Merge pull request #153968 from chengluyu/main Support variable fonts (#153291) — committed to microsoft/vscode by hediet 2 years ago
To be fair the praise should go 100% to @mekkablue who was helping me with this issue.
I think I found the issue: For OTVARs, it should (additionally?) translate the setting into a
font-variations-settingsproperty for axiswght, not just the font-weight property. Like this:Then it works