Skip to content

Commit 114b439

Browse files
committed
fix(ios): support fontWeight in html text
1 parent 2d61db1 commit 114b439

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"@angular/router": "~10.1.0",
5858
"@commitlint/cli": "^11.0.0",
5959
"@commitlint/config-conventional": "^11.0.0",
60-
"@nativescript-community/text": "^1.4.8",
60+
"@nativescript-community/text": "^1.4.9",
6161
"@nativescript/angular": "10.1.0",
6262
"@nativescript/core": "7.2.1",
6363
"@nativescript/types-android": "7.2.0",

plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232
"license": "Apache-2.0",
3333
"readmeFilename": "README.md",
3434
"dependencies": {
35-
"@nativescript-community/text": "^1.4.8"
35+
"@nativescript-community/text": "^1.4.9"
3636
}
3737
}

src/label.ios.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,11 +418,13 @@ export class Label extends LabelBase {
418418
} else {
419419
const font = this.nativeViewProtected.font;
420420
const fontSize = this.fontSize || font.pointSize;
421+
const fontWeight = this.style.fontWeight;
421422
const familyName = this.style.fontFamily || (this.style.fontInternal && this.style.fontInternal.fontFamily) || font.familyName;
422423
const result = createNativeAttributedString({
423424
text: this.html,
424425
fontSize,
425426
familyName,
427+
fontWeight,
426428
color: this.color,
427429
letterSpacing: this.letterSpacing,
428430
lineHeight: this.lineHeight,

0 commit comments

Comments
 (0)