feat: add Roboto font
This commit is contained in:
Родитель
6ebf55a9c6
Коммит
be8332ad4d
|
@ -18,6 +18,14 @@ on:
|
|||
|
||||
jobs:
|
||||
build_tool:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- fontName: "Fluent"
|
||||
projectName: uno.fonts.fluent
|
||||
- fontName: "Roboto"
|
||||
projectName: uno.fonts.roboto
|
||||
|
||||
name: Build
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
|
@ -44,19 +52,19 @@ jobs:
|
|||
useConfigFile: true
|
||||
configFilePath: build/gitversion.yml
|
||||
|
||||
- name: Build
|
||||
- name: Build ${{ matrix.fontName }} Font
|
||||
run: |
|
||||
cd nuget
|
||||
dotnet new classlib -f netstandard2.0 -o uno.fonts.fluent
|
||||
cd uno.fonts.fluent
|
||||
dotnet new classlib -f netstandard2.0 -o ${{ matrix.projectName }}
|
||||
cd ${{ matrix.projectName }}
|
||||
rm *.cs
|
||||
dotnet build -c Release
|
||||
cp bin\Release\netstandard2.0\uno.fonts.fluent.dll ..
|
||||
cp bin\Release\netstandard2.0\${{ matrix.projectName }}.dll ../${{ matrix.fontName }}
|
||||
|
||||
- name: Pack
|
||||
run: |
|
||||
$adjustedPackageVersion="${{ steps.gitversion.outputs.semVer }}".ToLower();
|
||||
build/nuget.exe pack nuget/Uno.Fonts.Fluent.nuspec -Version $adjustedPackageVersion -OutputDirectory ./artifacts
|
||||
build/nuget.exe pack nuget/${{ matrix.fontName }}/Uno.Fonts.${{ matrix.fontName }}.nuspec -Version $adjustedPackageVersion -OutputDirectory ./artifacts
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
</metadata>
|
||||
|
||||
<files>
|
||||
<file src="icon.png" />
|
||||
<file src="../webfonts/Uno Fluent Icons/uno-fluentui-assets.ttf" target="lib/netstandard1.0/Uno.Fonts.Fluent/Fonts" />
|
||||
<file src="../icon.png" />
|
||||
<file src="../../webfonts/Uno Fluent Icons/uno-fluentui-assets.ttf" target="lib/netstandard1.0/Uno.Fonts.Fluent/Fonts" />
|
||||
<file src="Uno.Fonts.Fluent.uprimarker" target="lib/netstandard1.0/Uno.Fonts.Fluent.uprimarker" />
|
||||
<file src="Uno.Fonts.Fluent.dll" target="lib/netstandard1.0/Uno.Fonts.Fluent.dll" />
|
||||
<file src="Uno.Fonts.Fluent.props" target="buildTransitive/Uno.Fonts.Fluent.props" />
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
|
||||
<metadata minClientVersion="5.0.0">
|
||||
<id>Uno.Fonts.Roboto</id>
|
||||
<version>1.0.0.0</version>
|
||||
<title>Uno Platform Roboto Font</title>
|
||||
<authors>Uno Platform</authors>
|
||||
<owners>unoplatform</owners>
|
||||
<license type="expression">Apache-2.0</license>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<projectUrl>https://github.com/unoplatform/uno.fonts</projectUrl>
|
||||
<icon>icon.png</icon>
|
||||
<description>Uno Platform Roboto Font</description>
|
||||
<copyright>Copyright (C) 2015-2023 Uno Platform inc. - all rights reserved</copyright>
|
||||
<repository type="git" url="https://github.com/unoplatform/uno.fonts.git" />
|
||||
</metadata>
|
||||
|
||||
<files>
|
||||
<file src="../icon.png" />
|
||||
<file src="../../webfonts/Roboto/Roboto-Light.ttf" target="lib/netstandard1.0/Uno.Fonts.Roboto/Fonts" />
|
||||
<file src="../../webfonts/Roboto/Roboto-Medium.ttf" target="lib/netstandard1.0/Uno.Fonts.Roboto/Fonts" />
|
||||
<file src="../../webfonts/Roboto/Roboto-Regular.ttf" target="lib/netstandard1.0/Uno.Fonts.Roboto/Fonts" />
|
||||
<file src="Uno.Fonts.Roboto.uprimarker" target="lib/netstandard1.0/Uno.Fonts.Roboto.uprimarker" />
|
||||
<file src="Uno.Fonts.Roboto.dll" target="lib/netstandard1.0/Uno.Fonts.Roboto.dll" />
|
||||
</files>
|
||||
</package>
|
|
@ -0,0 +1,53 @@
|
|||
/**
|
||||
When adding fonts here, make sure to add them using a base64 data uri, otherwise
|
||||
fonts loading are delayed, and text may get displayed incorrectly.
|
||||
*/
|
||||
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url(Roboto-Light.ttf) format('truetype');
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url(Roboto-Regular.ttf) format('truetype');
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
src: url(Roboto-Medium.ttf) format('truetype');
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Workaround for uno issue https://github.com/unoplatform/uno/issues/693 */
|
||||
body::after {
|
||||
font-family: 'Roboto';
|
||||
background: transparent;
|
||||
content: "";
|
||||
opacity: 0;
|
||||
font-weight: 300;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#uno-body::before {
|
||||
font-family: 'Roboto';
|
||||
background: transparent;
|
||||
content: "";
|
||||
opacity: 0;
|
||||
font-weight: 400;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#uno-body::after {
|
||||
font-family: 'Roboto';
|
||||
background: transparent;
|
||||
content: "";
|
||||
opacity: 0;
|
||||
font-weight: 500;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
}
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче