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

Commit

Permalink
Replaced the "Segoe MDL2 Assets" font with a newer one on build time.
Browse files Browse the repository at this point in the history
  • Loading branch information
COM8 committed Jun 6, 2019
1 parent 4a7e281 commit 794c2bb
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,4 @@ __pycache__/
*.odx.cs
*.xsd.cs
/UWPX_UI/Assets/Fonts/seguiemj.ttf
/UWPX_UI/Assets/Fonts/segmdl2.ttf
2 changes: 1 addition & 1 deletion UWPX_UI/Controls/Chat/EmojiPickerControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
<StackPanel.Resources>
<Style BasedOn="{StaticResource ToggleButtonRevealStyle}"
TargetType="ToggleButton">
<Setter Property="FontFamily" Value="Segoe MDL2 Assets"/>
<Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="FontSize" Value="20"/>
</Style>
Expand Down
4 changes: 3 additions & 1 deletion UWPX_UI/Resources/MyFonts.xaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

<!-- Replace the default windows Emoji font with a newer one for older devices so all get the new Emoji: -->
<!-- Replace the default Windows Segoe UI Emoji font with a newer one for older devices so all get the new Emoji. -->
<FontFamily x:Key="ContentControlThemeFontFamily">ms-appx:///Assets/Fonts/seguiemj.ttf#Segoe UI Emoji,XamlAutoFontFamily</FontFamily>
<!-- Replace the default Windows Segoe MDL2 Assets font with a newer one for older devices so all symbols are able to be displayed. -->
<FontFamily x:Key="SymbolThemeFontFamily">ms-appx:///Assets/Fonts/segmdl2.ttf#Segoe MDL2 Assets</FontFamily>
</ResourceDictionary>
2 changes: 1 addition & 1 deletion UWPX_UI/Resources/Styles/InfoButtonStyle.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Setter Property="Padding" Value="{StaticResource ButtonPadding}"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="FontFamily" Value="Segoe MDL2 Assets"/>
<Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}"/>
<Setter Property="FontWeight" Value="Normal"/>
<Setter Property="Content" Value="&#xE946;"/>
<Setter Property="FontSize" Value="20"/>
Expand Down
9 changes: 9 additions & 0 deletions UWPX_UI/Scripts/setupFont.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
$solPath = $args[0]

if (Test-Path "env:RunningCI") {
Write-Output "Skipping font import."
exit 0
}

Write-Output "Copying font 'Segoe UI Emoji' (seguiemj.ttf)..."
cp -force C:\Windows\Fonts\seguiemj.ttf $solPath\Assets\Fonts\seguiemj.ttf
Write-Output "Font copied"

Write-Output "Copying font 'Segoe MDL2 Assets' (segmdl2.ttf)..."
cp -force C:\Windows\Fonts\segmdl2.ttf $solPath\Assets\Fonts\segmdl2.ttf
Write-Output "Font copied"
1 change: 1 addition & 0 deletions UWPX_UI/UWPX_UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@
</AppxManifest>
<PRIResource Include="Strings\en-US\Resources.resw" />
<Content Include="Assets\Fonts\seguiemj.ttf" />
<Content Include="Assets\Fonts\segmdl2.ttf" />
<None Include="UWPX_UI_StoreKey.pfx" />
<None Include="UWPX_UI_TemporaryKey.pfx" />
</ItemGroup>
Expand Down

0 comments on commit 794c2bb

Please sign in to comment.