-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Description
Issue Description
When importing a custom font using "fonts" directory and using it, we get an over-height rendered text or icon on Android.
Edit: If it helps, setting nativeElement.nativeViewProtected.setIncludeFontPadding(false);
fixes the problem for a specific Label.
Reproduction
- Initialize a new project
- Put a custom font in
src/fonts
directory - Add a class which refers to the font:
.custom-font { font-family: "my-custom-font"; font-weight: 400; }
- Assign the class to a Label.
- Run the project and see the over-height text.
Relevant log output (if applicable)
Environment
OS: Linux 6.14 Ubuntu 25.04 25.04 (Plucky Puffin)
CPU: (22) x64 Intel(R) Core(TM) Ultra 7 155H
Shell: /usr/bin/zsh
node: 20.19.3
npm: 10.8.2
nativescript: 8.9.2
# android
java: 17.0.15
ndk: Not Found
apis: Not Found
build_tools: Not Found
system_images: Not Found
# ios
xcode: Not Found
cocoapods: Not Found
python: Not Found
python3: 3.13.3
ruby: Not Found
platforms: Not Found
Dependencies
"dependencies": {
"@angular/animations": "~20.0.0",
"@angular/common": "~20.0.0",
"@angular/compiler": "~20.0.0",
"@angular/core": "~20.0.0",
"@angular/forms": "~20.0.0",
"@angular/platform-browser": "~20.0.0",
"@angular/platform-browser-dynamic": "~20.0.0",
"@angular/router": "~20.0.0",
"@nativescript-community/ui-collectionview": "^6.0.4",
"@nativescript-community/universal-links": "^3.0.1",
"@nativescript/angular": "^20.0.0",
"@nativescript/core": "~8.9.5",
"@nativescript/localize": "^5.2.0",
"@nativescript/secure-storage": "^3.0.3",
"@triniwiz/nativescript-couchbase": "^1.4.0",
"@triniwiz/nativescript-image-cache-it": "^8.0.0-alpha.1",
"rxjs": "~7.8.0",
"zone.js": "~0.15.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "~20.0.0",
"@angular/compiler-cli": "~20.0.0",
"@nativescript/android": "8.9.1",
"@nativescript/tailwind": "^4.0.3",
"@nativescript/types": "~8.9.1",
"@nativescript/webpack": "~5.0.24",
"@ngtools/webpack": "~20.0.0",
"tailwindcss": "~4.1.11",
"typescript": "~5.8.3"
}
Please accept these terms
- I have searched the existing issues as well as StackOverflow and this has not been posted before
- This is a bug report
- I agree to follow this project's Code of Conduct