mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
fix(text-base): letter spacing for textfield (#8627)
closes https://github.com/NativeScript/NativeScript/pull/8626 closes https://github.com/NativeScript/NativeScript/issues/4892
This commit is contained in:
@ -288,6 +288,9 @@ export class TextBase extends TextBaseCommon {
|
||||
if (style.letterSpacing !== 0 && this.nativeTextViewProtected.font) {
|
||||
const kern = style.letterSpacing * this.nativeTextViewProtected.font.pointSize;
|
||||
dict.set(NSKernAttributeName, kern);
|
||||
if (this.nativeTextViewProtected instanceof UITextField) {
|
||||
this.nativeTextViewProtected.defaultTextAttributes.setValueForKey(kern, NSKernAttributeName);
|
||||
}
|
||||
}
|
||||
|
||||
if (style.color) {
|
||||
|
Reference in New Issue
Block a user