8000 Add support for numeric font `weight` by archmoj · Pull Request #6990 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Add support for numeric font weight #6990

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

Merged
merged 33 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
37dee48
Revert "no integer weight"
archmoj May 3, 2024
3212866
also drop font-weight 400 when exporting to SVG
archmoj May 3, 2024
448eb80
test scatter font weight
archmoj May 3, 2024
3a3f458
test bar font weight
archmoj May 3, 2024
15b25a5
use numeric font-weight in mocks
archmoj May 3, 2024
be24a14
skip validating font-weight-bar mock
archmoj May 3, 2024
d8424a3
draft log
archmoj May 6, 2024
353efc4
numeric text weight in gl3d
archmoj May 6, 2024
abb3fc8
link to include extra valid font-weight options in css-font and gl-text
archmoj May 6, 2024
8266a6d
test numeric font-weight values in scattergl pipeline
archmoj May 6, 2024
46e6b27
Revert "link to include extra valid font-weight options in css-font a…
archmoj May 6, 2024
3e4942a
fall back for unsupported font-weight values
archmoj May 6, 2024
72044b5
scattergl numeric font-weight render using bold/normal fallback
archmoj May 6, 2024
4d52885
correct mock name
archmoj May 6, 2024
b92ef23
improve scattergl test
archmoj May 6, 2024
b125396
test numeric weight in gl2d axis text
archmoj May 6, 2024
54005b9
convert typed array spec in integer, number, color, etc
archmoj May 6, 2024
09f4dd3
handle typed arrays in scatter3d
archmoj May 6, 2024
f67b40c
handle typed arrays in gl-axes3d
archmoj May 6, 2024
99162e5
handle numeric font weight in mapbox supported fonts
archmoj May 6, 2024
990fa8d
fix toSVG using weight: 400
archmoj May 6, 2024
f3c0356
improve mapbox text weight and italic handling
archmoj May 6, 2024
a5cc7f8
fix support of Open Sans Extrabold fonts
archmoj May 7, 2024
63824c1
test metropolis fonts on mapbox
archmoj May 7, 2024
190aef1
test italic Metropolis fonts
archmoj May 7, 2024
091e7d3
add weight test for open sans fonts - duplicate simple open-sans base…
archmoj May 7, 2024
82de3ff
add weight test for metropolis fonts - duplicate simple metropolis ba…
archmoj May 7, 2024
59779f3
Revert "test italic Metropolis fonts"
archmoj May 7, 2024
f6fcbd7
test numeric weights on axes 3d
archmoj May 8, 2024
10f477f
bump gl-axes3d and gl-scatter3d
archmoj May 8, 2024
82863fd
refactor src/traces/scattergl/convert.js
archmoj May 8, 2024
bff00ac
improve font family checks
archmoj May 8, 2024
48d057f
add comment
archmoj May 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test numeric font-weight values in scattergl pipeline
  • Loading branch information
archmoj committed May 6, 2024
commit 8266a6d06fb6b3f898bf36d86b1a2df87a91a9c3
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions test/image/mocks/zz-gl2d_font-variant-scatter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"data": [
{
"type": "scattergl",
"hovertemplate": "Difficult -0.123456789 | %{text}",
"texttemplate": "Difficult -0.123456789 | %{text}",
"mode": "text",
"text": [
"1 Minimum",
"100 Thin (Hairline)",
"200 Extra Light (Ultra Light)",
"300 Light",
"400 Normal (Regular)",
"500 Medium",
"600 Semi Bold (Demi Bold)",
"700 Bold",
"800 Extra Bold (Ultra Bold)",
"900 Black (Heavy)",
"950 Extra Black (Ultra Black)",
"1000 Maximum"
],
"textfont": {
"family": "Inter",
"size": 16,
"weight": [
1,
100,
200,
300,
400,
500,
600,
700,
800,
900,
950,
1000
]
},
"x": [0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0],
"y": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
}
],
"layout": {
"showlegend": false,
"margin": {
"l": 0,
"r": 0,
"t": 0,
"b": 0
},
"xaxis": {
"range": [-1, 1],
"showticklabels": false,
"showgrid": false,
"zeroline": false
},
"yaxis": {
"range": [11.5, -0.5],
"showticklabels": false,
"showgrid": false,
"zeroline": false
},
"width": 400,
"height": 600,
"hovermode": "closest"
}
}
0