Updated SharpFont to 3.0.0, adjusted font rendering code for new fixed-point types.

This commit is contained in:
Robert Rouhani
2015-03-20 23:51:24 -04:00
parent bc7fd81297
commit 4987a6b24c
4 changed files with 14 additions and 29 deletions

View File

@@ -102,13 +102,13 @@ namespace OpenRA.Graphics
face.LoadChar(c.First, LoadFlags.Default, LoadTarget.Normal);
face.Glyph.RenderGlyph(RenderMode.Normal);
var size = new Size((int)face.Glyph.Metrics.Width >> 6, (int)face.Glyph.Metrics.Height >> 6);
var size = new Size((int)face.Glyph.Metrics.Width, (int)face.Glyph.Metrics.Height);
var s = builder.Allocate(size);
var g = new GlyphInfo
{
Sprite = s,
Advance = (int)face.Glyph.Metrics.HorizontalAdvance / 64f,
Advance = (float)face.Glyph.Metrics.HorizontalAdvance,
Offset = new int2(face.Glyph.BitmapLeft, -face.Glyph.BitmapTop)
};

View File

@@ -16,10 +16,9 @@ fi
if [ ! -f windows/freetype6.dll ]; then
echo "Fetching FreeType2 from nuget"
nuget install freetype2.redist -Version 2.4.11.3 -ExcludeVersion
cp ./freetype2.redist/bin/win32/zlib1.dll ./windows/
cp ./freetype2.redist/bin/win32/freetype6.dll ./windows/
rm -rf freetype2.redist
nuget install SharpFont.Dependencies -Version 2.5.5.1 -ExcludeVersion
cp ./SharpFont.Dependencies/bin/msvc10/x86/freetype6.dll ./windows/
rm -rf SharpFont.Dependencies
fi
if [ ! -f windows/lua51.dll ]; then
@@ -29,13 +28,6 @@ if [ ! -f windows/lua51.dll ]; then
rm -rf lua.binaries
fi
if [ ! -f windows/zlib1.dll ]; then
echo "Fetching ZLib from nuget"
nuget install freetype2.redist -Version 2.4.11.3 -ExcludeVersion
cp ./freetype2.redist/bin/win32/zlib1.dll ./windows/
rm -rf freetype2.redist
fi
if [ ! -f windows/soft_oal.dll ]; then
echo "Fetching OpenAL Soft from nuget"
nuget install OpenAL-Soft -Version 1.16.0 -ExcludeVersion

View File

@@ -50,10 +50,11 @@ if (!(Test-Path "MaxMind.GeoIP2.dll"))
if (!(Test-Path "SharpFont.dll"))
{
echo "Fetching SharpFont from NuGet."
./nuget.exe install SharpFont -Version 2.5.0.1 -ExcludeVersion
./nuget.exe install SharpFont -Version 3.0.0 -ExcludeVersion
cp SharpFont/lib/net20/SharpFont* .
cp SharpFont/Content/SharpFont.dll.config .
cp SharpFont/config/SharpFont.dll.config .
rmdir SharpFont -Recurse
rmdir SharpFont.Dependencies -Recurse
}
if (!(Test-Path "nunit.framework.dll"))
@@ -92,18 +93,9 @@ if (!(Test-Path "windows/lua51.dll"))
if (!(Test-Path "windows/freetype6.dll"))
{
echo "Fetching FreeType2 from NuGet."
./nuget.exe install freetype2.redist -Version 2.4.11.3 -ExcludeVersion
cp freetype2.redist/bin/win32/zlib1.dll ./windows/zlib1.dll
cp freetype2.redist/bin/win32/freetype6.dll ./windows/freetype6.dll
rmdir freetype2.redist -Recurse
}
if (!(Test-Path "windows/zlib1.dll"))
{
echo "Fetching ZLib from NuGet."
./nuget.exe install freetype2.redist -Version 2.4.11.3 -ExcludeVersion
cp freetype2.redist/bin/win32/zlib1.dll ./windows/zlib1.dll
rmdir freetype2.redist -Recurse
./nuget.exe install SharpFont.Dependencies -Version 2.5.5.1 -ExcludeVersion
cp SharpFont.Dependencies/bin/msvc10/x86/freetype6.dll ./windows/freetype6.dll
rmdir SharpFont.Dependencies -Recurse
}
if (!(Test-Path "windows/soft_oal.dll"))

View File

@@ -39,10 +39,11 @@ fi
if [ ! -f SharpFont.dll ]; then
echo "Fetching SharpFont from nuget"
nuget install SharpFont -Version 2.5.0.1 -ExcludeVersion
nuget install SharpFont -Version 3.0.1 -ExcludeVersion
cp ./SharpFont/lib/net20/SharpFont* .
sed '/osx/s@\(dll="\)[^"]*\(" />\)@\1/Library/Frameworks/Mono.framework/Libraries/libfreetype.6.dylib\2@' ./SharpFont/Content/SharpFont.dll.config > SharpFont.dll.config
cp ./SharpFont/config/SharpFont.dll.config .
rm -rf SharpFont
rm -rf SharpFont.Dependencies
fi
if [ ! -f nunit.framework.dll ]; then