Skip to content

Commit

Permalink
Merge pull request #51 from SixLabors/netcore-2
Browse files Browse the repository at this point in the history
Add netstandard target framework
  • Loading branch information
JimBobSquarePants authored Nov 17, 2017
2 parents 02639aa + 81642b0 commit 94d9db6
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 53 deletions.
5 changes: 1 addition & 4 deletions src/SixLabors.Fonts/GlyphInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ public void RenderTo(IGlyphRenderer surface, float pointSize, Vector2 location,
// (lineHeight * dpi.Y)
if (surface.BeginGlyph(box, hash))
{

int startOfContor = 0;
int endOfContor = -1;
for (int i = 0; i < this.endPoints.Length; i++)
Expand Down Expand Up @@ -188,9 +187,7 @@ private Vector2 GetPoint(ref Vector2 scaledPoint, int pointIndex)

private static void AlignToGrid(ref Vector2 point)
{
Vector2 floorPoint = new Vector2(
(float)Math.Floor(point.X),
(float)Math.Floor(point.Y));
Vector2 floorPoint = new Vector2(MathF.Floor(point.X), MathF.Floor(point.Y));
Vector2 decimalPart = point - floorPoint;

if (decimalPart.X < 0.5)
Expand Down
97 changes: 48 additions & 49 deletions src/SixLabors.Fonts/SixLabors.Fonts.csproj
Original file line number Diff line number Diff line change
@@ -1,55 +1,54 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>A cross-platform library for loading and laying out for processing and measuring; written in C#</Description>
<AssemblyTitle>SixLabors.Fonts</AssemblyTitle>
<VersionPrefix Condition="$(packageversion) != ''">$(packageversion)</VersionPrefix>
<VersionPrefix Condition="$(packageversion) == ''">0.1.0-alpha1</VersionPrefix>
<Authors>Six Labors and contributors</Authors>
<TargetFrameworks>netstandard1.3;netstandard1.1</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>SixLabors.Fonts</AssemblyName>
<PackageId>SixLabors.Fonts</PackageId>
<PackageTags>font;truetype;opentype;woff</PackageTags>
<PackageIconUrl>https://raw.githubusercontent.com/SixLabors/Fonts/master/icons/icon.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/SixLabors/Fonts</PackageProjectUrl>
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/SixLabors/Fonts</RepositoryUrl>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<DebugType Condition="$(codecov) != ''">full</DebugType>
</PropertyGroup>
<PropertyGroup>
<Description>A cross-platform library for loading and laying out for processing and measuring; written in C#</Description>
<AssemblyTitle>SixLabors.Fonts</AssemblyTitle>
<VersionPrefix Condition="$(packageversion) != ''">$(packageversion)</VersionPrefix>
<VersionPrefix Condition="$(packageversion) == ''">0.1.0-alpha1</VersionPrefix>
<Authors>Six Labors and contributors</Authors>
<TargetFrameworks>netstandard2.0;netstandard1.3;netstandard1.1</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>SixLabors.Fonts</AssemblyName>
<PackageId>SixLabors.Fonts</PackageId>
<PackageTags>font;truetype;opentype;woff</PackageTags>
<PackageIconUrl>https://raw.githubusercontent.com/SixLabors/Fonts/master/icons/icon.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/SixLabors/Fonts</PackageProjectUrl>
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/SixLabors/Fonts</RepositoryUrl>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<DebugType Condition="$(codecov) != ''">full</DebugType>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\Shared\*.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
</ItemGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>..\SixLabors.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Shared\*.cs" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="..\..\stylecop.json" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="System.Collections.Immutable" Version="1.4.0" />
<PackageReference Include="SixLabors.Core" Version="1.0.0-beta0003" />
</ItemGroup>
<PropertyGroup>
<CodeAnalysisRuleSet>..\SixLabors.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<DefineConstants>$(DefineConstants);FILESYSTEM</DefineConstants>
</PropertyGroup>
<ItemGroup>
<AdditionalFiles Include="..\..\stylecop.json" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="System.Collections.Immutable" Version="1.4.0" />
<PackageReference Include="SixLabors.Core" Version="1.0.0-beta0004" />
</ItemGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' OR '$(TargetFramework)' == 'netstandard2.0'">
<DefineConstants>$(DefineConstants);FILESYSTEM</DefineConstants>
</PropertyGroup>
</Project>

0 comments on commit 94d9db6

Please sign in to comment.