Skip to content

Commit

Permalink
project: Update for 2.11.0 merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sibras committed Aug 8, 2021
1 parent 05f2a64 commit 0bc13c9
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 33 deletions.
37 changes: 36 additions & 1 deletion SMP/SMP.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
diff --git a/builds/windows/ftsystem.c b/builds/windows/ftsystem.c
index cb1c7340e..e89907bca 100644
--- a/builds/windows/ftsystem.c
+++ b/builds/windows/ftsystem.c
@@ -217,8 +217,30 @@
return FT_THROW( Invalid_Stream_Handle );

/* open the file */
+#if !defined( WINAPI_FAMILY ) || !( WINAPI_FAMILY == WINAPI_FAMILY_PC_APP || \
+ WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP )
file = CreateFileA( filepathname, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0 );
+#else
+ WCHAR wlpFileName[MAX_PATH];
+ if ( MultiByteToWideChar( CP_UTF8, 0, filepathname, -1, wlpFileName,
+ MAX_PATH ) == 0 )
+ {
+ file = INVALID_HANDLE_VALUE;
+ }
+ else
+ {
+ CREATEFILE2_EXTENDED_PARAMETERS CreateExParams = { 0 };
+ CreateExParams.dwSize = sizeof( CREATEFILE2_EXTENDED_PARAMETERS );
+ CreateExParams.dwFileAttributes = FILE_ATTRIBUTE_NORMAL & 0xFFFF;
+ CreateExParams.dwFileFlags = FILE_ATTRIBUTE_NORMAL & 0xFFF00000;
+ CreateExParams.dwSecurityQosFlags = FILE_ATTRIBUTE_NORMAL & 0x000F0000;
+ CreateExParams.lpSecurityAttributes = NULL;
+ CreateExParams.hTemplateFile = 0;
+ file = CreateFile2( wlpFileName, GENERIC_READ, FILE_SHARE_READ,
+ OPEN_EXISTING, &CreateExParams );
+ }
+#endif
if ( file == INVALID_HANDLE_VALUE )
{
FT_ERROR(( "FT_Stream_Open:" ));
diff --git a/src/base/ftver.rc b/src/base/ftver.rc
index 15dda7f4f..652842a6d 100644
index 5fe433cbd..877a5fcc6 100644
--- a/src/base/ftver.rc
+++ b/src/base/ftver.rc
@@ -29,11 +29,19 @@ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
Expand Down
2 changes: 2 additions & 0 deletions SMP/freetype/config/ftstdlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#undef near

#undef ft_fopen
#define ft_fopen ft_fopen_win32

Expand Down
9 changes: 9 additions & 0 deletions SMP/libfreetype.def
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ EXPORTS
FT_Get_Char_Index
FT_Get_Charmap_Index
FT_Get_Color_Glyph_Layer
FT_Get_Color_Glyph_Paint
FT_Get_Colorline_Stops
FT_Get_FSType_Flags
FT_Get_First_Char
FT_Get_Font_Format
Expand All @@ -82,6 +84,8 @@ EXPORTS
FT_Get_PS_Font_Info
FT_Get_PS_Font_Private
FT_Get_PS_Font_Value
FT_Get_Paint
FT_Get_Paint_Layers
FT_Get_Postscript_Name
FT_Get_Renderer
FT_Get_Sfnt_LangTag
Expand All @@ -90,6 +94,7 @@ EXPORTS
FT_Get_Sfnt_Table
FT_Get_SubGlyph_Info
FT_Get_Track_Kerning
FT_Get_Transform
FT_Get_TrueType_Engine_Type
FT_Get_Var_Axis_Flags
FT_Get_Var_Blend_Coordinates
Expand Down Expand Up @@ -167,7 +172,9 @@ EXPORTS
FT_Set_Char_Size
FT_Set_Charmap
FT_Set_Debug_Hook
FT_Set_Default_Log_Handler
FT_Set_Default_Properties
FT_Set_Log_Handler
FT_Set_MM_Blend_Coordinates
FT_Set_MM_Design_Coordinates
FT_Set_MM_WeightVector
Expand Down Expand Up @@ -197,6 +204,8 @@ EXPORTS
FT_Stroker_Rewind
FT_Stroker_Set
FT_Tan
FT_Trace_Set_Default_Level
FT_Trace_Set_Level
FT_TrueTypeGX_Free
FT_TrueTypeGX_Validate
FT_Vector_From_Polar
Expand Down
16 changes: 8 additions & 8 deletions SMP/libfreetype2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ del "$(OutDir)"\include\freetype2\freetype\ftmac.h
mkdir "$(OutDir)"\include\freetype2\freetype\config
copy ..\include\freetype\config\*.h "$(OutDir)"\include\freetype2\freetype\config
mkdir $(OutDir)\licenses
copy ..\docs\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
copy ..\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if exist "$(OutDir)"\include\freetype2 (
Expand Down Expand Up @@ -62,7 +62,7 @@ del "$(OutDir)"\include\freetype2\freetype\ftmac.h
mkdir "$(OutDir)"\include\freetype2\freetype\config
copy ..\include\freetype\config\*.h "$(OutDir)"\include\freetype2\freetype\config
mkdir $(OutDir)\licenses
copy ..\docs\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
copy ..\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if exist "$(OutDir)"\include\freetype2 (
Expand Down Expand Up @@ -103,7 +103,7 @@ del "$(OutDir)"\include\freetype2\freetype\ftmac.h
mkdir "$(OutDir)"\include\freetype2\freetype\config
copy ..\include\freetype\config\*.h "$(OutDir)"\include\freetype2\freetype\config
mkdir $(OutDir)\licenses
copy ..\docs\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
copy ..\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if exist "$(OutDir)"\include\freetype2 (
Expand Down Expand Up @@ -144,7 +144,7 @@ del "$(OutDir)"\include\freetype2\freetype\ftmac.h
mkdir "$(OutDir)"\include\freetype2\freetype\config
copy ..\include\freetype\config\*.h "$(OutDir)"\include\freetype2\freetype\config
mkdir $(OutDir)\licenses
copy ..\docs\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
copy ..\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if exist "$(OutDir)"\include\freetype2 (
Expand Down Expand Up @@ -182,7 +182,7 @@ del "$(OutDir)"\include\freetype2\freetype\ftmac.h
mkdir "$(OutDir)"\include\freetype2\freetype\config
copy ..\include\freetype\config\*.h "$(OutDir)"\include\freetype2\freetype\config
mkdir $(OutDir)\licenses
copy ..\docs\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
copy ..\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if exist "$(OutDir)"\include\freetype2 (
Expand Down Expand Up @@ -220,7 +220,7 @@ del "$(OutDir)"\include\freetype2\freetype\ftmac.h
mkdir "$(OutDir)"\include\freetype2\freetype\config
copy ..\include\freetype\config\*.h "$(OutDir)"\include\freetype2\freetype\config
mkdir $(OutDir)\licenses
copy ..\docs\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
copy ..\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if exist "$(OutDir)"\include\freetype2 (
Expand Down Expand Up @@ -261,7 +261,7 @@ del "$(OutDir)"\include\freetype2\freetype\ftmac.h
mkdir "$(OutDir)"\include\freetype2\freetype\config
copy ..\include\freetype\config\*.h "$(OutDir)"\include\freetype2\freetype\config
mkdir $(OutDir)\licenses
copy ..\docs\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
copy ..\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if exist "$(OutDir)"\include\freetype2 (
Expand Down Expand Up @@ -302,7 +302,7 @@ del "$(OutDir)"\include\freetype2\freetype\ftmac.h
mkdir "$(OutDir)"\include\freetype2\freetype\config
copy ..\include\freetype\config\*.h "$(OutDir)"\include\freetype2\freetype\config
mkdir $(OutDir)\licenses
copy ..\docs\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
copy ..\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if exist "$(OutDir)"\include\freetype2 (
Expand Down
27 changes: 21 additions & 6 deletions SMP/libfreetype2.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@
<Filter Include="Header Files\freetype2\freetype\internal\services">
<UniqueIdentifier>{f66bb9d5-8398-4c14-b337-2e935f0edce6}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\sdf">
<UniqueIdentifier>{46f02623-0903-4433-b3bc-096b73f7ec2c}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\dlg">
<UniqueIdentifier>{e171133d-f1b9-45a7-8e88-ee7634e0d30f}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\build">
<UniqueIdentifier>{49b18f97-ea5d-480f-89e8-70602ee7fecd}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\src\autofit\autofit.c">
Expand Down Expand Up @@ -132,9 +141,6 @@
<ClCompile Include="..\src\base\ftsynth.c">
<Filter>Source Files\base</Filter>
</ClCompile>
<ClCompile Include="..\src\base\ftsystem.c">
<Filter>Source Files\base</Filter>
</ClCompile>
<ClCompile Include="..\src\base\fttype1.c">
<Filter>Source Files\base</Filter>
</ClCompile>
Expand Down Expand Up @@ -204,12 +210,21 @@
<ClCompile Include="..\src\bzip2\ftbzip2.c">
<Filter>Source Files\bzip2</Filter>
</ClCompile>
<ClCompile Include="..\builds\windows\ftdebug.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\cache\ftcache.c">
<Filter>Source Files\cache</Filter>
</ClCompile>
<ClCompile Include="..\src\sdf\sdf.c">
<Filter>Source Files\sdf</Filter>
</ClCompile>
<ClCompile Include="..\src\dlg\dlgwrap.c">
<Filter>Source Files\dlg</Filter>
</ClCompile>
<ClCompile Include="..\builds\windows\ftsystem.c">
<Filter>Source Files\build</Filter>
</ClCompile>
<ClCompile Include="..\builds\windows\ftdebug.c">
<Filter>Source Files\build</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\ft2build.h">
Expand Down
4 changes: 3 additions & 1 deletion SMP/libfreetype2_files.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="..\builds\windows\ftdebug.c" />
<ClCompile Include="..\builds\windows\ftsystem.c" />
<ClCompile Include="..\src\autofit\autofit.c" />
<ClCompile Include="..\src\base\ftbase.c" />
<ClCompile Include="..\src\base\ftbbox.c" />
Expand All @@ -19,14 +20,14 @@
<ClCompile Include="..\src\base\ftpfr.c" />
<ClCompile Include="..\src\base\ftstroke.c" />
<ClCompile Include="..\src\base\ftsynth.c" />
<ClCompile Include="..\src\base\ftsystem.c" />
<ClCompile Include="..\src\base\fttype1.c" />
<ClCompile Include="..\src\base\ftwinfnt.c" />
<ClCompile Include="..\src\bdf\bdf.c" />
<ClCompile Include="..\src\bzip2\ftbzip2.c" />
<ClCompile Include="..\src\cache\ftcache.c" />
<ClCompile Include="..\src\cff\cff.c" />
<ClCompile Include="..\src\cid\type1cid.c" />
<ClCompile Include="..\src\dlg\dlgwrap.c" />
<ClCompile Include="..\src\gzip\ftgzip.c" />
<ClCompile Include="..\src\lzw\ftlzw.c" />
<ClCompile Include="..\src\pcf\pcf.c" />
Expand All @@ -35,6 +36,7 @@
<ClCompile Include="..\src\pshinter\pshinter.c" />
<ClCompile Include="..\src\psnames\psmodule.c" />
<ClCompile Include="..\src\raster\raster.c" />
<ClCompile Include="..\src\sdf\sdf.c" />
<ClCompile Include="..\src\sfnt\sfnt.c" />
<ClCompile Include="..\src\smooth\smooth.c" />
<ClCompile Include="..\src\truetype\truetype.c" />
Expand Down
16 changes: 8 additions & 8 deletions SMP/libfreetype2_winrt.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ del "$(OutDir)"\include\freetype2\freetype\ftmac.h
mkdir "$(OutDir)"\include\freetype2\freetype\config
copy ..\include\freetype\config\*.h "$(OutDir)"\include\freetype2\freetype\config
mkdir $(OutDir)\licenses
copy ..\docs\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
copy ..\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if exist "$(OutDir)"\include\freetype2 (
Expand Down Expand Up @@ -62,7 +62,7 @@ del "$(OutDir)"\include\freetype2\freetype\ftmac.h
mkdir "$(OutDir)"\include\freetype2\freetype\config
copy ..\include\freetype\config\*.h "$(OutDir)"\include\freetype2\freetype\config
mkdir $(OutDir)\licenses
copy ..\docs\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
copy ..\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if exist "$(OutDir)"\include\freetype2 (
Expand Down Expand Up @@ -103,7 +103,7 @@ del "$(OutDir)"\include\freetype2\freetype\ftmac.h
mkdir "$(OutDir)"\include\freetype2\freetype\config
copy ..\include\freetype\config\*.h "$(OutDir)"\include\freetype2\freetype\config
mkdir $(OutDir)\licenses
copy ..\docs\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
copy ..\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if exist "$(OutDir)"\include\freetype2 (
Expand Down Expand Up @@ -144,7 +144,7 @@ del "$(OutDir)"\include\freetype2\freetype\ftmac.h
mkdir "$(OutDir)"\include\freetype2\freetype\config
copy ..\include\freetype\config\*.h "$(OutDir)"\include\freetype2\freetype\config
mkdir $(OutDir)\licenses
copy ..\docs\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
copy ..\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if exist "$(OutDir)"\include\freetype2 (
Expand Down Expand Up @@ -182,7 +182,7 @@ del "$(OutDir)"\include\freetype2\freetype\ftmac.h
mkdir "$(OutDir)"\include\freetype2\freetype\config
copy ..\include\freetype\config\*.h "$(OutDir)"\include\freetype2\freetype\config
mkdir $(OutDir)\licenses
copy ..\docs\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
copy ..\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if exist "$(OutDir)"\include\freetype2 (
Expand Down Expand Up @@ -220,7 +220,7 @@ del "$(OutDir)"\include\freetype2\freetype\ftmac.h
mkdir "$(OutDir)"\include\freetype2\freetype\config
copy ..\include\freetype\config\*.h "$(OutDir)"\include\freetype2\freetype\config
mkdir $(OutDir)\licenses
copy ..\docs\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
copy ..\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if exist "$(OutDir)"\include\freetype2 (
Expand Down Expand Up @@ -261,7 +261,7 @@ del "$(OutDir)"\include\freetype2\freetype\ftmac.h
mkdir "$(OutDir)"\include\freetype2\freetype\config
copy ..\include\freetype\config\*.h "$(OutDir)"\include\freetype2\freetype\config
mkdir $(OutDir)\licenses
copy ..\docs\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
copy ..\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if exist "$(OutDir)"\include\freetype2 (
Expand Down Expand Up @@ -302,7 +302,7 @@ del "$(OutDir)"\include\freetype2\freetype\ftmac.h
mkdir "$(OutDir)"\include\freetype2\freetype\config
copy ..\include\freetype\config\*.h "$(OutDir)"\include\freetype2\freetype\config
mkdir $(OutDir)\licenses
copy ..\docs\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
copy ..\LICENSE.TXT $(OutDir)\licenses\freetype2.txt</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>if exist "$(OutDir)"\include\freetype2 (
Expand Down
Loading

0 comments on commit 0bc13c9

Please sign in to comment.