Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
lahma committed Jul 26, 2023
1 parent f4502cf commit 39cb1d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,19 @@ static void DeleteCompilationArtifacts()
{
static void StartSudoProcess(string arguments) => ProcessTasks.StartProcess("sudo", arguments).WaitForExit();
StartSudoProcess("fc-match \"Noto Color Emoji\"");
StartSudoProcess("ls /usr/share/fonts/truetype/noto/");
StartSudoProcess("ls /usr/local/share/fonts/");
StartSudoProcess("apt install -y fonts-noto-color-emoji");
/*
StartSudoProcess("mkdir -p /usr/local/share/fonts");
StartSudoProcess("cp /usr/share/fonts/truetype/noto/NotoColorEmoji.ttf /usr/local/share/fonts/");
StartSudoProcess("chmod 644 /usr/local/share/fonts/NotoColorEmoji.ttf");
*/
StartSudoProcess("fc-cache -fv");
// for current user
ProcessTasks.StartProcess("fc-cache", "-fv");
StartSudoProcess("fc-match \"Noto Color Emoji\"");
ProcessTasks.StartProcess("fc-match", "\"Noto Color Emoji\"").WaitForExit();
});

Target Pack => _ => _
Expand Down
1 change: 1 addition & 0 deletions main/SS/Util/SheetUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ public static int GetDefaultCharWidth(IWorkbook wb)
//TextLayout layout = new TextLayout(str.getIterator(), fontRenderContext);
//int defaultCharWidth = (int)layout.getAdvance();
Font font = IFont2Font(defaultFont);
Console.WriteLine($"FONT - family: {font.Family}, name: {font.Name}");
return (int)Math.Ceiling(TextMeasurer.Measure(new string(defaultChar, 1), new TextOptions(font)).Width);
}

Expand Down

0 comments on commit 39cb1d0

Please sign in to comment.