I am trying to use Icon Fonts on my NativeScript app.
So I followed the oficial documentation and those were my steps:
(1) - Downloaded the ttf files into my app/fonts folder:
(2) - On my app.css I declared the font global class like so:
.fa {
font-family: "Font Awesome 5 Free", "fa-regular-400", "fa-solid-
900";
}
.fa-solid {
font-family: "Font Awesome 5 Free", "fa-solid-900";
}
(3) - Then on my html component:
<Label text="" class="far"></Label>
But My Icon does not appear on the screen. I am using NativeScript 6+ with Angular 8.
Any Help ?
I figure it out why the Font Icons wasn't showing up!
I was using NativeScript 5.1 and since version 6.0 was released I migrated the project:
tns migrate
The problem is that I was using NS with Angular 8 and according to the docs I have to place my fonts on the project's root folder.
In your root application folder (This is the app folder for NativeScript Core, and the src folder for Angular 6+), create a folder called fonts and place the .ttf there.
So, Clearly the problem was that my fonts folder was inside /app when it should be inside /src folder.
It took me too long to realize that because for some strange reason my imported text fonts like 'Montserrat.tff' was working just fine. So I thought the problem was related with NativeScript or whatever.
In short, the Wrong way to do it with NativeScript and Angular 6+:
The right way:
I hope this helps newcomers who may stumble in the same problem/situation.
Related
I followed this tutorial: http://darrinb.com/adding-custom-icon-wordpress-plugin/
I added the assets/icon-128-128.jpg
But icon does not show up after release to plugin store.
have you tried renaming the file to icon-128x128.png ?
this is a known problem in the wordpress community.
here is another way to solve your problem
Inserting this:
---theme
fonts
fontawesome-webfont.eot
...
css
fontawesome.css
...
After xcode upd to v.11 (before update all works fine) Custom fonts do not work
But fonts are displayed in xcode
react-native.config.js
module.exports = {
assets: ['./src/assets/fonts/'], };
react-native link - did not help
cleaning derived data and build folder - did not help
So it seems problems with font itself with new versions of xcode or ios. Even on new and fresh project - it does not work.
Other custom fonts - work fine. Sp I found similar font
But before update - it worked
I am trying to download and use the Montserrat font family but I can't understand how to use the ttf file in my xamarin android project. I am downloading the ttf from this site https://fonts.google.com/ . Can anyone help me? Thanks a lot.
You can work with fonts in android using Typeface.
To use your custom downloaded fonts put them in your assets folder (better to make a subfolder named Fonts) then make a typeface using:
Typeface.CreateFromAsset(Application.Context.Assets, "Fonts/yourfontname.ttf");
I'm just trying new CKEditor 5 and after compiling the code with laravel-mix, which uses webpack, the icons are extracted to the public directory under fonts directory, but when I load the editor - they are not showing.
Is there any webpack configuration I could use to specify where I want them to be saved and I'm not quite clear on how to fix the issue with icons not showing.
I cannot see glyphicons with laravel 5. I tried putting /fonts direcory into /public laravel folder:
/laravel/public/css/app.css (compiled boostrap .less files from laravel/resources/assets/less/bootstrap)
/laravel/public/fonts/ fonts from boostrap website.
Still nothing. Any ideas?
Nevermind. Fixed it. Apparently laravel elixir was turned on and I had css builds, so had to put fonts into /public/build.