From 261f058dc71ab3ced9ee0493ce49753bd75d9350 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Fri, 17 Nov 2017 21:18:52 +1100 Subject: [PATCH 1/2] Add netstandard target framework --- src/SixLabors.Fonts/GlyphInstance.cs | 4 +- src/SixLabors.Fonts/SixLabors.Fonts.csproj | 97 +++++++++++----------- 2 files changed, 49 insertions(+), 52 deletions(-) diff --git a/src/SixLabors.Fonts/GlyphInstance.cs b/src/SixLabors.Fonts/GlyphInstance.cs index ea23ff1a3..eb856893a 100644 --- a/src/SixLabors.Fonts/GlyphInstance.cs +++ b/src/SixLabors.Fonts/GlyphInstance.cs @@ -188,9 +188,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) diff --git a/src/SixLabors.Fonts/SixLabors.Fonts.csproj b/src/SixLabors.Fonts/SixLabors.Fonts.csproj index bf2911054..ef5a7b179 100644 --- a/src/SixLabors.Fonts/SixLabors.Fonts.csproj +++ b/src/SixLabors.Fonts/SixLabors.Fonts.csproj @@ -1,55 +1,54 @@  - - A cross-platform library for loading and laying out for processing and measuring; written in C# - SixLabors.Fonts - $(packageversion) - 0.1.0-alpha1 - Six Labors and contributors - netstandard1.3;netstandard1.1 - true - true - SixLabors.Fonts - SixLabors.Fonts - font;truetype;opentype;woff - https://raw.githubusercontent.com/SixLabors/Fonts/master/icons/icon.png - https://github.com/SixLabors/Fonts - http://www.apache.org/licenses/LICENSE-2.0 - git - https://github.com/SixLabors/Fonts - false - false - false - false - false - false - false - false - false - full - + + A cross-platform library for loading and laying out for processing and measuring; written in C# + SixLabors.Fonts + $(packageversion) + 0.1.0-alpha1 + Six Labors and contributors + netstandard2.0;netstandard1.3;netstandard1.1 + true + true + SixLabors.Fonts + SixLabors.Fonts + font;truetype;opentype;woff + https://raw.githubusercontent.com/SixLabors/Fonts/master/icons/icon.png + https://github.com/SixLabors/Fonts + http://www.apache.org/licenses/LICENSE-2.0 + git + https://github.com/SixLabors/Fonts + false + false + false + false + false + false + false + false + false + full + - - - - - - ..\SixLabors.ruleset - + + + - - - - - - - All - - - - + + ..\SixLabors.ruleset + - - $(DefineConstants);FILESYSTEM - + + + + + + + All + + + + + + $(DefineConstants);FILESYSTEM + From 81642b098600ffcbd0b830dfa158390170ed0895 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Fri, 17 Nov 2017 21:22:08 +1100 Subject: [PATCH 2/2] Fix extra line --- src/SixLabors.Fonts/GlyphInstance.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/SixLabors.Fonts/GlyphInstance.cs b/src/SixLabors.Fonts/GlyphInstance.cs index eb856893a..135ed80d5 100644 --- a/src/SixLabors.Fonts/GlyphInstance.cs +++ b/src/SixLabors.Fonts/GlyphInstance.cs @@ -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++)