Giter Site home page Giter Site logo

Comments (5)

toptensoftware avatar toptensoftware commented on July 28, 2024

Thanks for reporting this. I'll need more information in order to get this sorted. Can you post an example program showing the issue along with details of exactly what is wrong and how you expect it to appear and I'll look into it.

from richtextkit.

e-jlion avatar e-jlion commented on July 28, 2024

Thanks for reporting this. I'll need more information in order to get this sorted. Can you post an example program showing the issue along with details of exactly what is wrong and how you expect it to appear and I'll look into it.

Hi :
I use the Paint method to draw Hindi, such as "परीक्षण भेजें" After drawing by Paint, the result of drawing on the Linux system is "[][][][][][][]; Help to see if you need a font library or how to solve it

Core Code:

         drawString.Font = new TextBlock();
            drawString.Style = new Style()
            {
                FontFamily = "Segoe UI Emoji",
                TextColor = SKColors.White,
                FontSize = 35,
                FontWeight = 700,
            };

            drawString.Font.MaxWidth = 500;
            drawString.Font.MaxHeight = 60;
            drawString.Font.Alignment = TextAlignment.Left;

            var getText = entity.Text2;
            if (getText.Length > 18 && !getText.Contains("..."))
            {
                getText = getText.Substring(0, 18) + "...";
            }
            drawString.Font.AddText(getText, drawString.Style);
            drawString.Font.Paint(canvas, new SKPoint(35, 120));

from richtextkit.

toptensoftware avatar toptensoftware commented on July 28, 2024

I'll need to look into this in detail to figure out what's going on, but I'm a bit time limited right now. If I had to guess I'd say there's something going wrong with SkiaSharp's font fallback - perhaps Linux related.

As an experiment could you try calling SKFontManager.Default.MatchCharacter() with the same font and character and check that it returns a suitable type face as the fallback. If not, then this is a problem external to RichTextKit.

Alternatively you could try setting a breakpoint in the character matcher and check what's happening.

from richtextkit.

e-jlion avatar e-jlion commented on July 28, 2024

I'll need to look into this in detail to figure out what's going on, but I'm a bit time limited right now. If I had to guess I'd say there's something going wrong with SkiaSharp's font fallback - perhaps Linux related.

As an experiment could you try calling SKFontManager.Default.MatchCharacter() with the same font and character and check that it returns a suitable type face as the fallback. If not, then this is a problem external to RichTextKit.

Alternatively you could try setting a breakpoint in the character matcher and check what's happening.

I tried it, and now I find it doesn’t work, I’ll try again and put the obtained font library on it and try the result

from richtextkit.

e-jlion avatar e-jlion commented on July 28, 2024

I'll need to look into this in detail to figure out what's going on, but I'm a bit time limited right now. If I had to guess I'd say there's something going wrong with SkiaSharp's font fallback - perhaps Linux related.
As an experiment could you try calling SKFontManager.Default.MatchCharacter() with the same font and character and check that it returns a suitable type face as the fallback. If not, then this is a problem external to RichTextKit.
Alternatively you could try setting a breakpoint in the character matcher and check what's happening.

I tried it, and now I find it doesn’t work, I’ll try again and put the obtained font library on it and try the result, this result it is ok

from richtextkit.

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.