8000 Add `shadow`, `lineposition` and `textcase` options to SVG fonts by archmoj · Pull Request #6983 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Add shadow, lineposition and textcase options to SVG fonts #6983

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 62 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
e9b2efd
test container-legend
archmoj Apr 24, 2024
698b010
test contour_constraints_equal_boundary_minmax
archmoj Apr 24, 2024
faae542
test font-variant-bar
archmoj Apr 24, 2024
5bd8a2d
test funnel_axis_textangle_outside
archmoj Apr 24, 2024
628b0aa
test funnel_horizontal_group_basic
archmoj Apr 24, 2024
a9479f5
test geo_africa-insets
archmoj Apr 24, 2024
625c3c1
test geo_canadian-cities
archmoj Apr 24, 2024
20cace9
test geo_country-names-text-chart
archmoj Apr 24, 2024
034f446
test geo_text_chart_arrays
archmoj Apr 24, 2024
1f044fe
test geo_text_chart_arrays custom title shadow
archmoj Apr 24, 2024
0a7e182
test heatmap_brick_padding
archmoj Apr 24, 2024
974a30e
test heatmap-text-color-on-missing-data
archmoj Apr 24, 2024
cff115c
test indicator_attrs
archmoj Apr 24, 2024
5b2e77a
test indicator_scatter
archmoj Apr 24, 2024
5709630
test insiderange
archmoj Apr 24, 2024
0044abf
test pie_legend_line_color_array
archmoj Apr 24, 2024
1fc4a5a
test polar_bar-overlay
archmoj Apr 24, 2024
70fec4b
test sankey_messy
archmoj Apr 24, 2024
67bbbb1
test text_on_shapes_basic
archmoj Apr 24, 2024
65586cd
test texttemplate
archmoj Apr 24, 2024
b8b8d0a
test texttemplate_scatter
archmoj Apr 24, 2024
647895a
test ticklabelposition-5
archmoj Apr 24, 2024
d39fe8b
test treemap_multi-line_headers
archmoj Apr 24, 2024
58cfeb3
Merge remote-tracking branch 'origin/master' into font-shadow-stridin…
archmoj Apr 25, 2024
150f0c8
introduce overrideDflt option for coerceFont
archmoj May 3, 2024
e79ce86
refactor src/components/fx/hover.js
archmoj May 3, 2024
d7c6f8f
fix colorbar.title.font default
archmoj May 3, 2024
55f27fc
capitalize none > normal
archmoj May 3, 2024
0c91191
lowercase > lower, uppercase > upper
archmoj May 3, 2024
b0977dd
replace case options with object
archmoj May 3, 2024
581b2fc
striding > decorline
archmoj May 3, 2024
c8fe2fc
Merge remote-tracking branch 'origin/master' into font-shadow-stridin…
archmoj May 8, 2024
a3ad2e8
rename keys
archmoj May 9, 2024
47ebc09
correct schema
archmoj May 10, 2024
042b2ad
capitalize > textcase
archmoj May 10, 2024
4bbe9a2
textcase: word > headline
archmoj May 10, 2024
70f3370
textcase: headline > caps - Capitalizing Every Word Is NOT headline case
archmoj May 10, 2024
6f20c25
use new options in trace_metatext mock
archmoj May 10, 2024
84bc75c
test new options
archmoj May 10, 2024
cff60fb
use Drawing.font to style titles
archmoj May 13, 2024
3ff255f
caps > word caps
archmoj May 14, 2024
a344464
decorline > lineposition
archmoj May 14, 2024
9416441
clear none text font styles instead of setting to none
archmoj May 15, 2024
e60123f
Merge remote-tracking branch 'origin/master' into font-shadow-stridin…
archmoj May 16, 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
textcase: headline > caps - Capitalizing Every Word Is NOT headline case
  • Loading branch information
archmoj committed May 10, 2024
commit 70f3370cd7439dd37584491af3ac040c49c41570
2 changes: 1 addition & 1 deletion src/components/drawing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ drawing.font = function(s, font) {

var textcase2transformOptions = {
normal: 'none',
headline: 'capitalize',
caps: 'capitalize',
lower: 'lowercase',
upper: 'uppercase'
};
Expand Down
2 changes: 1 addition & 1 deletion src/plots/font_attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ module.exports = function(opts) {
textcase: opts.noFontTextcase ? undefined : {
editType: editType,
valType: 'enumerated',
values: ['normal', 'headline', 'upper', 'lower'],
values: ['normal', 'caps', 'upper', 'lower'],
dflt: 'normal',
description: [
'Sets capitalization of text.',
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/axes_custom-ticks_log-date.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/axes_labels.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/bar-colorscale-colorbar.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/bar_annotation_max_range_eq_category.json
< 10000 tr data-hunk="45ba13efc195e14a15d4757c873b04ea851535411708dab05b8612c5289beded" class="show-top-border">
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"weight": "bold",
"style": "italic",
"variant": "small-caps",
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/bar_attrs_group_norm.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"layout":{
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/bar_gantt-chart.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/benchmarks.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/canada_geo_projections.json
Original file line number Diff line number Diff line change
Expand Up @@ -3869,7 +3869,7 @@
],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/cliponaxis_false-dates-log.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/container-legend.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/funnel_axis_textangle_outside.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/funnel_horizontal_group_basic.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/geo_africa-insets.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/geo_canadian-cities.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
}
},
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto",
"family": "Noto Serif, serif"
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/heatmap-text-color-on-missing-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/indicator_attrs.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"weight": "bold",
"style": "italic",
"variant": "small-caps",
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/sankey_messy.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
}],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto"
},
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/text_on_shapes_basic.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto",
"weight": "bold",
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/texttemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto",
"weight": 700,
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/texttemplate_scatter.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
],
"layout": {
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto",
"weight": "700",
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/ticklabelposition-5.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
"gridcolor": "white"
},
"font": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto",
"size": 16
Expand Down
2 changes: 1 addition & 1 deletion test/image/mocks/treemap_multi-line_headers.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"textposition": "middle center",
"texttemplate": "<b>%{label}</b>",
"textfont": {
"textcase": "headline",
"textcase": "caps",
"decorline": "under",
"shadow": "auto",
"size": 20
Expand Down
4 changes: 2 additions & 2 deletions test/jasmine/tests/bar_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ describe('Bar.supplyDefaults', function() {
weight: 'bold',
style: 'italic',
variant: 'small-caps',
textcase: 'headline',
textcase: 'caps',
decorline: 'under',
shadow: 'auto',
}
Expand All @@ -170,7 +170,7 @@ describe('Bar.supplyDefaults', function() {
weight: 'bold',
style: 'italic',
variant: 'small-caps',
textcase: 'headline',
textcase: 'caps',
decorline: 'under',
shadow: 'auto',
};
Expand Down
4 changes: 2 additions & 2 deletions test/jasmine/tests/funnel_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ describe('Funnel.supplyDefaults', function() {
weight: 'bold',
style: 'italic',
variant: 'small-caps',
textcase: 'headline',
textcase: 'caps',
decorline: 'under',
shadow: 'auto',
}
Expand All @@ -171,7 +171,7 @@ describe('Funnel.supplyDefaults', function() {
weight: 'bold',
style: 'italic',
variant: 'small-caps',
textcase: 'headline',
textcase: 'caps',
decorline: 'under',
shadow: 'auto',
};
Expand Down
10 changes: 5 additions & 5 deletions test/jasmine/tests/fx_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ describe('Fx defaults', function() {
weight: 'bold',
style: 'italic',
variant: 'small-caps',
textcase: 'headline',
textcase: 'caps',
decorline: 'under',
shadow: 'auto',
}
Expand All @@ -174,7 +174,7 @@ describe('Fx defaults', function() {
weight: 'bold',
style: 'italic',
variant: 'small-caps',
textcase: 'headline',
textcase: 'caps',
decorline: 'under',
shadow: 'auto',
},
Expand All @@ -192,7 +192,7 @@ describe('Fx defaults', function() {
weight: 'bold',
style: 'italic',
variant: 'small-caps',
textcase: 'headline',
textcase: 'caps',
decorline: 'under',
shadow: 'auto',
},
Expand All @@ -210,7 +210,7 @@ describe('Fx defaults', function() {
weight: 'bold',
style: 'italic',
variant: 'small-caps',
textcase: 'headline',
textcase: 'caps',
decorline: 'under',
shadow: 'auto',
}
Expand All @@ -226,7 +226,7 @@ describe('Fx defaults', function() {
weight: 'bold',
style: 'italic',
variant: 'small-caps',
textcase: 'headline',
textcase: 'caps',
decorline: 'under',
shadow: 'auto',
}
Expand Down
4 changes: 2 additions & 2 deletions test/jasmine/tests/lib_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ describe('Test lib.js:', function() {
weight: 'bold',
style: 'italic',
variant: 'small-caps',
textcase: 'headline',
textcase: 'caps',
decorline: 'under',
shadow: 'auto',
};
Expand Down Expand Up @@ -1111,7 +1111,7 @@ describe('Test lib.js:', function() {
var goodVariant = 'small-caps';
var badVariant = false;

var goodTextcase = 'headline';
var goodTextcase = 'caps';
var badTextcase = true;
var goodStriding = 'under';
var badStriding = 'underline';
Expand Down
4 changes: 2 additions & 2 deletions test/jasmine/tests/parcoords_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('parcoords initialization tests', function() {
weight: 'bold',
style: 'italic',
variant: 'small-caps',
textcase: 'headline',
textcase: 'caps',
decorline: 'under',
shadow: '1px 1px 2px green',
};
Expand All @@ -110,7 +110,7 @@ describe('parcoords initialization tests', function() {
weight: 'bold',
style: 'italic',
variant: 'small-caps',
textcase: 'headline',
textcase: 'caps',
decorline: 'under',
shadow: '1px 1px 2px green',
};
Expand Down
4 changes: 2 additions & 2 deletions test/jasmine/tests/sankey_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ describe('sankey tests', function() {
weight: 'bold',
style: 'italic',
variant: 'small-caps',
textcase: 'headline',
textcase: 'caps',
decorline: 'under',
shadow: '1px 1px 2px green',
}});
Expand All @@ -169,7 +169,7 @@ describe('sankey tests', function() {
weight: 'bold',
style: 'italic',
variant: 'small-caps',
textcase: 'headline',
textcase: 'caps',
decorline: 'under',
shadow: '1px 1px 2px green',
}, 'textfont is defined');
Expand Down
Loading
0