Git Product home page Git Product logo

Comments (7)

dme-compunet avatar dme-compunet commented on June 4, 2024 1

I updated it, now you can use FontFamily.

from yolov8.

dme-compunet avatar dme-compunet commented on June 4, 2024

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.

binary-number avatar binary-number commented on June 4, 2024

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.

dme-compunet avatar dme-compunet commented on June 4, 2024

Will changing the string FontName property to FontFamily FontFamily in PlottingOptions solve your problem?

from yolov8.

binary-number avatar binary-number commented on June 4, 2024

If you are not afraid of losing compatibility, I think that solution is fine.

from yolov8.

dme-compunet avatar dme-compunet commented on June 4, 2024

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.

binary-number avatar binary-number commented on June 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.