Tweak default canvas, text size, font, stroke width

main
radex 2024-02-01 23:11:25 +01:00
parent ce30d49122
commit 785d70afb4
Signed by: radex
SSH Key Fingerprint: SHA256:hvqRXAGG1h89yqnS+cyFTLKQbzjWD4uXIqw7Y+0ws30
3 changed files with 10 additions and 5 deletions

View File

@ -60,7 +60,12 @@ const dao = [
name: "canvasContent",
label: "Canvas Content",
type: "string",
default: "<svg xmlns='http://www.w3.org/2000/svg' width='600' height='400' viewBox='0 0 600 400'></svg>",
default: `<svg xmlns='http://www.w3.org/2000/svg' width='600' height='400' viewBox='0 0 600 400'>
<g>
<title>Layer 1</title>
<text font-weight="normal" font-style="normal" stroke="#000" xml:space="preserve" text-anchor="start" font-family="'Open Sans'" font-size="42" id="svg_1" y="54.90625" x="10" stroke-width="0" fill="#000000">Sample text</text>
</g>
</svg>`,
private: true,
save: true
},

View File

@ -5,7 +5,7 @@ window.methodDraw = function() {
canvas_expansion: 1,
dimensions: [800,600],
initFill: {color: 'fff', opacity: 1},
initStroke: {width: 1.5, color: '000', opacity: 1},
initStroke: {width: 3, color: '000', opacity: 1},
initOpacity: 1,
imgPath: 'images/',
extPath: 'extensions/',

View File

@ -47,10 +47,10 @@ var curConfig = {
selectNew: true,
dimensions: [600, 400],
initFill: {color: 'fff', opacity: 1},
initStroke: {width: 1, color: '000', opacity: 1},
initStroke: {width: 3, color: '000', opacity: 1},
imgPath: 'images/',
baseUnit: 'px',
defaultFont: "Noto Sans JP"
defaultFont: "Open Sans"
};
// Update config with new one if given
@ -146,7 +146,7 @@ all_properties.text = $.extend(true, {}, all_properties.shape);
$.extend(all_properties.text, {
fill: "#000000",
stroke_width: 0,
font_size: 24,
font_size: 42,
font_family: curConfig.defaultFont
});