Skip to content

armgit / Filee

Public Imported from GitHub
0

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

Merge remote-tracking branch 'origin/main' into pr281-w

KnifeLemona08a1bb72ad5
diff --cc src/Filee.Engines/Hwp/RhwpFonts.cs
index 38d11d10,db11f4a5..a2ad17f6
--- a/src/Filee.Engines/Hwp/RhwpFonts.cs
+++ b/src/Filee.Engines/Hwp/RhwpFonts.cs
@@@ -197,8 -196,10 +197,10 @@@ internal static class RhwpFont
if (typeface is null)
continue;
if (OperatingSystem.IsWindows() || string.Equals(typeface.FamilyName, candidate, StringComparison.OrdinalIgnoreCase))
- return new InstalledFont(IsUsable(typeface), codePoint => typeface.GetGlyph(codePoint) != 0);
+ return new InstalledFont(IsUsable(typeface), codePoint => typeface.GetGlyph(codePoint) != 0, codePoint => Advance(typeface, codePoint));
- typeface.Dispose();
+ // Not disposed: SkiaSharp hands out one wrapper per native typeface, so this may be the very object the
+ // CAD font cache, Svg.Skia or the UI's font manager still draws with. Disposing it would leave them a
+ // null handle (a native crash on their next call); the finalizer releases it once nobody uses it.
}
return null;
});