-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed extra level of indirection fixing #96
APIs fixed: Face.GetSfntName, Face.GetPSFontInfo, and Face.GetPSFontPrivate
- Loading branch information
1 parent
ab71d30
commit 07a8e76
Showing
7 changed files
with
26 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#region MIT License | ||
/*Copyright (c) 2012-2015 Robert Rouhani <[email protected]> | ||
/*Copyright (c) 2012-2016 Robert Rouhani <[email protected]> | ||
SharpFont based on Tao.FreeType, Copyright (c) 2003-2007 Tao Framework Team | ||
|
@@ -292,10 +292,10 @@ public static partial class FT | |
internal static extern bool FT_Has_PS_Glyph_Names(IntPtr face); | ||
|
||
[DllImport(FreetypeDll, CallingConvention = CallConvention)] | ||
internal static extern Error FT_Get_PS_Font_Info(IntPtr face, out IntPtr afont_info); | ||
internal static extern Error FT_Get_PS_Font_Info(IntPtr face, out PostScript.Internal.FontInfoRec afont_info); | ||
|
||
[DllImport(FreetypeDll, CallingConvention = CallConvention)] | ||
internal static extern Error FT_Get_PS_Font_Private(IntPtr face, out IntPtr afont_private); | ||
internal static extern Error FT_Get_PS_Font_Private(IntPtr face, out PostScript.Internal.PrivateRec afont_private); | ||
|
||
[DllImport(FreetypeDll, CallingConvention = CallConvention)] | ||
internal static extern int FT_Get_PS_Font_Value(IntPtr face, DictionaryKeys key, uint idx, ref IntPtr value, int value_len); | ||
|
@@ -308,7 +308,7 @@ public static partial class FT | |
internal static extern uint FT_Get_Sfnt_Name_Count(IntPtr face); | ||
|
||
[DllImport(FreetypeDll, CallingConvention = CallConvention)] | ||
internal static extern Error FT_Get_Sfnt_Name(IntPtr face, uint idx, out IntPtr aname); | ||
internal static extern Error FT_Get_Sfnt_Name(IntPtr face, uint idx, out TrueType.Internal.SfntNameRec aname); | ||
|
||
#endregion | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#region MIT License | ||
/*Copyright (c) 2012-2013 Robert Rouhani <[email protected]> | ||
/*Copyright (c) 2012-2013, 2016 Robert Rouhani <[email protected]> | ||
SharpFont based on Tao.FreeType, Copyright (c) 2003-2007 Tao Framework Team | ||
|
@@ -59,7 +59,7 @@ public Private PrivateDictionary | |
{ | ||
get | ||
{ | ||
return new Private(reference); | ||
return new Private(rec.private_dict); | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#region MIT License | ||
/*Copyright (c) 2012-2013 Robert Rouhani <[email protected]> | ||
/*Copyright (c) 2012-2013, 2016 Robert Rouhani <[email protected]> | ||
SharpFont based on Tao.FreeType, Copyright (c) 2003-2007 Tao Framework Team | ||
|
@@ -115,7 +115,7 @@ public FontInfo FontInfo | |
{ | ||
get | ||
{ | ||
return new FontInfo(PInvokeHelper.AbsoluteOffsetOf<FaceInfoRec>(Reference, "font_info")); | ||
return new FontInfo(rec.font_info); | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#region MIT License | ||
/*Copyright (c) 2012-2013 Robert Rouhani <[email protected]> | ||
/*Copyright (c) 2012-2013, 2016 Robert Rouhani <[email protected]> | ||
SharpFont based on Tao.FreeType, Copyright (c) 2003-2007 Tao Framework Team | ||
|
@@ -37,16 +37,15 @@ public class FontInfo | |
{ | ||
#region Fields | ||
|
||
private IntPtr reference; | ||
private FontInfoRec rec; | ||
|
||
#endregion | ||
|
||
#region Constructors | ||
|
||
internal FontInfo(IntPtr reference) | ||
internal FontInfo(FontInfoRec rec) | ||
{ | ||
Reference = reference; | ||
this.rec = rec; | ||
} | ||
|
||
#endregion | ||
|
@@ -153,20 +152,6 @@ public ushort UnderlineThickness | |
} | ||
} | ||
|
||
internal IntPtr Reference | ||
{ | ||
get | ||
{ | ||
return reference; | ||
} | ||
|
||
set | ||
{ | ||
reference = value; | ||
rec = PInvokeHelper.PtrToStructure<FontInfoRec>(reference); | ||
} | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#region MIT License | ||
/*Copyright (c) 2012-2013 Robert Rouhani <[email protected]> | ||
/*Copyright (c) 2012-2013, 2016 Robert Rouhani <[email protected]> | ||
SharpFont based on Tao.FreeType, Copyright (c) 2003-2007 Tao Framework Team | ||
|
@@ -37,16 +37,15 @@ public class Private | |
{ | ||
#region Fields | ||
|
||
private IntPtr reference; | ||
private PrivateRec rec; | ||
|
||
#endregion | ||
|
||
#region Constructors | ||
|
||
internal Private(IntPtr reference) | ||
internal Private(PrivateRec rec) | ||
{ | ||
Reference = reference; | ||
this.rec = rec; | ||
} | ||
|
||
#endregion | ||
|
@@ -342,20 +341,6 @@ public short[] MinFeature | |
} | ||
} | ||
|
||
internal IntPtr Reference | ||
{ | ||
get | ||
{ | ||
return reference; | ||
} | ||
|
||
set | ||
{ | ||
reference = value; | ||
rec = PInvokeHelper.PtrToStructure<PrivateRec>(reference); | ||
} | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#region MIT License | ||
/*Copyright (c) 2012-2013 Robert Rouhani <[email protected]> | ||
/*Copyright (c) 2012-2013, 2016 Robert Rouhani <[email protected]> | ||
SharpFont based on Tao.FreeType, Copyright (c) 2003-2007 Tao Framework Team | ||
|
@@ -44,16 +44,15 @@ public class SfntName | |
{ | ||
#region Fields | ||
|
||
private IntPtr reference; | ||
private SfntNameRec rec; | ||
|
||
#endregion | ||
|
||
#region Constructors | ||
|
||
internal SfntName(IntPtr reference) | ||
internal SfntName(SfntNameRec rec) | ||
{ | ||
Reference = reference; | ||
this.rec = rec; | ||
} | ||
|
||
#endregion | ||
|
@@ -125,20 +124,6 @@ public string String | |
} | ||
} | ||
|
||
internal IntPtr Reference | ||
{ | ||
get | ||
{ | ||
return reference; | ||
} | ||
|
||
set | ||
{ | ||
reference = value; | ||
rec = PInvokeHelper.PtrToStructure<SfntNameRec>(reference); | ||
} | ||
} | ||
|
||
#endregion | ||
} | ||
} |