Skip to content

[SVG] Implement missing ISvgAssetLoader APIs (GetFontMetrics, MeasureText, GetTextPath) for compatibility with Svg.Skia ≥ 3.0.4 #21378

Closed
unoplatform/uno.templates
#1769

Description

@agneszitte

What would you like to be added? 💡

Uno’s SkiaAssetLoader currently implements LoadImage(Stream stream) and FindTypefaces(string? text, SKPaint paintPreferredTypeface).

  • Starting with Svg.Skia 3.0.4-beta.1, the ISvgAssetLoader interface gained two new methods (PR #318 – Use SKIA text metrics):

    SKFontMetrics GetFontMetrics(SKPaint paint);
    float MeasureText(string? text, SKPaint paint, ref SKRect bounds);
  • In Svg.Skia 3.0.4-beta.2, another method was added (PR #326 – Add text path conversion):

    SKPath? GetTextPath(string? text, SKPaint paint, float x, float y);

Because Uno’s SkiaAssetLoader doesn’t implement these, using Svg.Skia ≥ 3.0.4 results, for example, with:

System.TypeLoadException: Method 'GetFontMetrics' in type 'Uno.Svg.Skia.SkiaAssetLoader' does not have an implementation.

Why is this needed? 🤔

SkiaAssetLoader should implement all APIs from ISvgAssetLoader so it is compatible with Svg.Skia ≥ 3.0.4.

Renderer 🎨

  • Skia
  • Native

For which platforms 📱💻🖥️

All platforms 🌍

Anything else we need to know? 💬

Related issue where this missing support was identified: #21372

Activity

  1. added
    kind/enhancement
    triage/untriaged
    difficulty/tbd
    on Aug 28, 2025
  2. agneszitte commented on Sep 8, 2025

    @agneszitte
    MemberAuthor

    Info for QA
    Similar tests done for #21372 will need to be done here with latest 6.3.x version this time

  3. self-assigned this
    on Sep 12, 2025
  4. khaskoul commented on Sep 16, 2025

    @khaskoul

    Fixed with latest SDK version 6.3.12
    Tested with:
    Templates/SDK: 6.3.12
    Platform(s): Desktop, WASM
    VS VSIX: 6.3.7
    Rider: 1.7.5
    VS Code: 0.22.1
    IDE: Rider 2025.2, VS Code 1.104.0, VS 17.14.14
    OS: Windows, Linux

  5. github-actions commented on May 1, 2026

    @github-actions
    Contributor

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests.

  6. locked as resolved and limited conversation to collaborators on May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

difficulty/tbdkind/enhancementtriage/untriaged

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions