From 114b439a80742d8a4317364242c6f44b81dc7ed1 Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Tue, 16 Mar 2021 14:56:58 +0100 Subject: [PATCH] fix(ios): support fontWeight in html text --- package.json | 2 +- plugin/package.json | 2 +- src/label.ios.ts | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index de529ee..10d3e7a 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@angular/router": "~10.1.0", "@commitlint/cli": "^11.0.0", "@commitlint/config-conventional": "^11.0.0", - "@nativescript-community/text": "^1.4.8", + "@nativescript-community/text": "^1.4.9", "@nativescript/angular": "10.1.0", "@nativescript/core": "7.2.1", "@nativescript/types-android": "7.2.0", diff --git a/plugin/package.json b/plugin/package.json index 58764b3..e79252b 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -32,6 +32,6 @@ "license": "Apache-2.0", "readmeFilename": "README.md", "dependencies": { - "@nativescript-community/text": "^1.4.8" + "@nativescript-community/text": "^1.4.9" } } diff --git a/src/label.ios.ts b/src/label.ios.ts index fd40e44..c211f9d 100644 --- a/src/label.ios.ts +++ b/src/label.ios.ts @@ -418,11 +418,13 @@ export class Label extends LabelBase { } else { const font = this.nativeViewProtected.font; const fontSize = this.fontSize || font.pointSize; + const fontWeight = this.style.fontWeight; const familyName = this.style.fontFamily || (this.style.fontInternal && this.style.fontInternal.fontFamily) || font.familyName; const result = createNativeAttributedString({ text: this.html, fontSize, familyName, + fontWeight, color: this.color, letterSpacing: this.letterSpacing, lineHeight: this.lineHeight,