Skip to content

Commit e0fedab

Browse files
committed
feat(graphical engine): boldness js side
1 parent a0db9b1 commit e0fedab

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

engine/modules/entities/src/main/resources/view/entity-module/Command.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const PROPERTY_KEY_MAP = {
2424
sc: 'strokeColor',
2525
ff: 'fontFamily',
2626
s: 'fontSize',
27+
fw: 'fontWeight',
2728
T: 'text',
2829
ch: 'children',
2930
sx: 'scaleX',

engine/modules/entities/src/main/resources/view/entity-module/Text.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ export class Text extends TextureBasedEntity {
1111
strokeThickness: 0,
1212
fillColor: 0,
1313
fontSize: 26,
14-
fontFamily: 'Lato'
14+
fontFamily: 'Lato',
15+
fontWeight: 'normal'
1516
})
1617
}
1718

@@ -33,5 +34,6 @@ export class Text extends TextureBasedEntity {
3334
this.graphics.style.fill = state.fillColor
3435
this.graphics.style.fontSize = state.fontSize || 1
3536
this.graphics.style.fontFamily = state.fontFamily
37+
this.graphics.style.fontWeight = state.fontWeight
3638
}
3739
}

engine/modules/entities/src/main/resources/view/entity-module/properties.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export const PROPERTIES = {
102102
}
103103
},
104104
fontFamily: stringOpts,
105+
fontWeight: stringOpts,
105106
children: {
106107
...stringOpts,
107108
convert (value) {

0 commit comments

Comments
 (0)