Flutter - how add custom font for svg image? - flutter

I have svg image(export from Adobe Xd). For the correct display of this file, I need to install an additional font in the system(MAC or Windows) - then the picture is displayed correctly, without this font it is incorrect. but I need to display this drawing in application. I using flutter_svg plugin. I download ttf of font, add in assets and pubspec. But after that it doesn't work either. how add custom font for svg image(with flutter_svg)?

Related

Interactive SVG with flutter

I am trying to display on a flutter app (here on the desktop version) this kind of interactive svg:
Svg flame graph
The problem is that since Flutter doesn't support svg by default, they only a few solution to it. The flutter_svg package doesn't work in my case because it render a picture. So the interactivity will not work. We can't click on the svg and have the data changing according to where we clicked.
In addition, we have a potential search with text that is included in this svg. Finally, this svg provided is only an example but in my project a svg of this type will be generated depending on the user need. So, I can't "hard code" the svg in my project.
So, do you have any ideas how to display that kind of svg in an flutter app?

How to copy the text along with font styling in flutter?

What I am doing is simple. I am simply copy and paste the font from flutter It copies only the letters the font styles are not copying.
styling properties are given to display text in given Style it is not the property of text. Text is copied in UTF byte Format so, When you copy text Only text gets copied the style and Other property does not get copied.
Flutter works with custom fonts and you can apply a custom font across an entire app or to individual widgets. This recipe creates an app that uses custom fonts with the following steps:
Import the font files.
Declare the font in the pubspec.
Set a font as the default.
Use a font in a specific widget.

flutter android launch_background.xml file

i need an example of launch_background.xml file in android folder that contains and image and (text)...basically my main problem is that i can't place text in this splash screen..so to be specific...i want to achieve splash screen that contains and image and under it there is some text...
i achieved the image preview with bitmap tag inside of an item tag
but no Textview tag can be placed inside layer-list tag :( (not showing)
i know that i can make the text as an svg file and place it in item tag..but i want to do it with TextView tag...so i can control it
any help would be much appreciated...thanks in advance.
Ok to give a solution to my own problem... at first I didn't like to place my text inside a separate .png file for the purpose of reducing the apk file size. I placed it inside an svg file for the size purpose but I couldn't place that text in svg beneath the centered image... unless by hardcoding values with the attributes: "android:gravity=center" "android:top=200dp" ...and I don't feel comfortable with hardcoded values... so I searched and found this package "flutter_native_splash" Flutter Native Splash.
Placed the desired image and beneath it the desired text and the package generated the appropriate image densities for the various screens containing the image and text...

Flutter - SVG file's stroke becomes more thin

I have an SVG type file. I want to show it in my Flutter app using flutter_svg package. But when I imported it, the color turns into black.
According to this answer, I 'm using this software to clean it.
For some files, it's worked really well. But, I have an issue with this file.
When I'm trying to show it in my app, the stroke width decreased and my SVG becomes really thin.
This is what I want:
But, this is what I've got:
Does anyone have an idea how to solve this?
ATTACHMENT: This is the SVG file link
You need to create a path from the outline stroke line.
this is your svg: https://gist.github.com/kherel/02f288ecd73f0c29a04b1f2d9c5db3e3
I've used figma

Using a UIWebView, can I use a custom font?

I've seen all the talk on the web about the difficulty of using a custom font in iPhone OS. Is it possible, to load a font from within my bundle into the UIWebView component?
EDIT: I saw it in the app called "Omer" by "Rusty Brick"... It seems to be a web view, because I see a delay and during the loading delay the custom area is white. What other component could this have been?
EDIT2: I contacted Rusty Brick. They told me which font it was. A standard font.
It is possible to load custom fonts into your UIWebView in iOS3.2 and above. Add the font to your bundle (see here) then just reference the font in your UIWebView's stylesheet like you would any other font:
<style type='text/css'>font { font-family: DroidSerif; } </style>
It is possible, but you need to make certain to add the Fonts provided by application key-value pair to the Info.plist.
I learned about it in this tutorial: http://tetontech.wordpress.com/2010/09/03/using-custom-fonts-in-your-ios-application/
I tried it with a LWFM and a FFIL font suitcase, but this didn't work. In the end I needed the TTF file of the font.
When referencing the font in your code use the PostScript name. To get the correct name for your font, open the Font Book application, select the font and click on the i in the upper left corner to open the information panel.