Comments (7)
I updated it, now you can use FontFamily.
from yolov8.
Thanks for bringing this to my attention.
I don't exactly understand to which way I should change it, can you show me a code sample that can load a font in Android Maui environment.
from yolov8.
Thank you for your response.
I was looking into the SystemFonts.CreateFont method and found that this commit supports loading Android system fonts.
We believe this version will be adapted in the next release.
However, there may be a period of time before the next release,
The YoloV8 project did not support loading external fonts.
So I wrote a program to solve this problem.
https://github.com/binary-number/YOLOv8/tree/MauiFontTest
I had so much fun writing the code that instead of writing sample source code, I actually wrote the improved code. My apologies.
Here is the source description
You can load external fonts by adding them to FontManager.LoadedFontCollection.
Also, we replaced SystemFonts.CreateFont method with FontManager.CreateFont method, and FontManager.CreateFont method looks for fonts from within the LoadedFontCollection as well.
Also, since Arial fonts were not available for Android, Robot fonts were specified.
If there is no problem with this code, I will send a pull request.
Thank you in advance.
from yolov8.
Will changing the string FontName
property to FontFamily FontFamily
in PlottingOptions
solve your problem?
from yolov8.
If you are not afraid of losing compatibility, I think that solution is fine.
from yolov8.
Now I see that in the stable version published a week ago, the problem with the fonts in Android has already been fixed, is it important for you to still use FontFamily
or is it fine now?
from yolov8.
I updated the version of SixLabors.ImageSharp.Drawing to 1.0.0 and ran it, and it was possible to specify the system font from the fontname, so I think the problem with the error has been resolved.
However, I think it is significant to replace fontname with FontFamily.
By replacing fontname with FontFamily, it will be possible to dynamically load fonts embedded in software, fonts on the web, or font files enclosed in applications from a stream or file. By being able to load arbitrary font files, you no longer need to be aware of differences between environments.
from yolov8.
Related Issues (20)
- 请问是不是只能在.net上边使用,不能在.net Framework项目上用?
- Solving problems with multithreading when working with GPU HOT 6
- Application hangs on Detect() with GPU HOT 1
- Understanding Yolov8 Task Input and Output Formats in OnnxRuntime HOT 1
- Difference between Python and DotNet HOT 1
- Is there a best example of multithreading or WebApi? HOT 1
- How to enable GPU HOT 3
- Inconsistent model results HOT 3
- Suggest adding OBB support HOT 2
- [discussion] optimize code logic to improve operational efficiency HOT 2
- Index was outside the bounds of the array. HOT 5
- Logic for resizing images to fit the size of the model input data. HOT 4
- Inference with Camera HOT 2
- It's not really using the GPU
- Getting lower confidence values HOT 2
- Load Image HOT 2
- Possible to select between fp16 and fp32? HOT 1
- Error Sequence contains no elements on image plotting HOT 3
- some pictures does not show transparent boxes HOT 1
- Произошла ошибка в обработке клиента onnxruntime_providers_cuda.dll мой проект пробовал на GPU с библиотекой YoloV8.Gpu v4.0.0 HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolov8.