Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Tizen] Fix custom font issue #12707

Merged
merged 1 commit into from
Nov 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Xamarin.Forms.Platform.Tizen/EmbeddedFontLoader.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.IO;
using ElmSharp;
using Tizen.Common;
using IOPath = System.IO.Path;
using TApplication = Tizen.Applications.Application;

Expand Down Expand Up @@ -29,6 +30,12 @@ public EmbeddedFontLoader()
{
font.ResourceStream.CopyTo(fileStream);
}

if (DotnetUtil.TizenAPIVersion > 5)
{
FontExtensions.FontReinit();
}

return (true, filePath);
}
catch (Exception ex)
Expand Down
9 changes: 9 additions & 0 deletions Xamarin.Forms.Platform.Tizen/Extensions/FontExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Runtime.InteropServices;
using Xamarin.Forms.Core;
using Xamarin.Forms.Internals;

Expand Down Expand Up @@ -50,5 +51,13 @@ static string CleanseFontName(string fontName)
}
return fontFile.PostScriptName;
}

public static void FontReinit()
{
evas_font_reinit();
}

[DllImport("libelementary.so.1")]
static extern void evas_font_reinit();
}
}