diff --git a/Build/PackageRestore.targets b/Build/PackageRestore.targets index b227afafb4..f2380cd00c 100644 --- a/Build/PackageRestore.targets +++ b/Build/PackageRestore.targets @@ -35,6 +35,10 @@ 4.500 + + 6.200 $(fwrt)/packages @@ -291,6 +295,20 @@ DownloadsDir="$(DownloadsDir)" Condition="'$(OS)'=='Windows_NT' AND !Exists('$(DownloadsDir)/TonePars64.exe')" /> + + + + RenderTestAssemblySetup can load it privately. Tied to the exact pinned version (keep + ScheherazadeNewTestFontVersion in sync with ScheherazadeNewVersion in + Build/PackageRestore.targets) so the copied test font is deterministic, even if Downloads/ + holds more than one extracted version. --> + + 4.500 + $(OutDir)..\..\Downloads\ScheherazadeNew\ScheherazadeNew-$(ScheherazadeNewTestFontVersion)\ScheherazadeNew-Regular.ttf + - - <_ArabicRenderFont Include="$(OutDir)..\..\Downloads\ScheherazadeNew\**\ScheherazadeNew-Regular.ttf" /> - - + Condition="Exists('$(ScheherazadeNewTestFontPath)')" /> \ No newline at end of file diff --git a/Src/views/Test/TestData/Fonts/CharisSIL-5.000/CharisSIL-R.ttf b/Src/views/Test/TestData/Fonts/CharisSIL-5.000/CharisSIL-R.ttf deleted file mode 100644 index b8e686a6f6..0000000000 Binary files a/Src/views/Test/TestData/Fonts/CharisSIL-5.000/CharisSIL-R.ttf and /dev/null differ diff --git a/Src/views/Test/TestData/Fonts/CharisSIL-5.000/OFL.txt b/Src/views/Test/TestData/Fonts/CharisSIL-5.000/OFL.txt deleted file mode 100644 index 7fb722dcaa..0000000000 --- a/Src/views/Test/TestData/Fonts/CharisSIL-5.000/OFL.txt +++ /dev/null @@ -1,94 +0,0 @@ -This Font Software is Copyright (c) 1997-2014, SIL International (http://scripts.sil.org/) -with Reserved Font Names "Charis" and "SIL". - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/Src/views/Test/TestData/Fonts/CharisSIL-5.000/README.txt b/Src/views/Test/TestData/Fonts/CharisSIL-5.000/README.txt deleted file mode 100644 index 6ef6281aa0..0000000000 --- a/Src/views/Test/TestData/Fonts/CharisSIL-5.000/README.txt +++ /dev/null @@ -1,81 +0,0 @@ -README -Charis SIL -======================== - -Thank you for your interest in the Charis SIL fonts. -We hope you find them useful! - -Charis SIL provides glyphs for a wide range of Latin and Cyrillic characters. -Please read the documentation on the website -(http://scripts.sil.org/CharisSILfont) to see what ranges are supported. - -Charis SIL is released under the SIL Open Font License. -Charis SIL is a trademark of SIL International. - -See the OFL and OFL-FAQ for details of the SIL Open Font License. -See the FONTLOG for information on this and previous releases. -See the website (http://scripts.sil.org/CharisSILfont) documentation or the -Charis SIL FAQ (http://scripts.sil.org/ComplexRomanFontFAQ) for frequently -asked questions and their answers. - -TIPS -==== - -As this font is distributed at no cost, we are unable to provide a -commercial level of personal technical support. The font has, however, -been through some testing on various platforms to be sure it works in most -situations. In particular, it has been tested and shown to work on Windows XP, -Windows Vista and Windows 7. Graphite capabilities have been tested on -Graphite-supported platforms. - -If you do find a problem, please do report it to fonts@sil.org. -We can't guarantee any direct response, but will try to fix reported bugs in -future versions. Make sure you read through the -Charis SIL FAQ (http://scripts.sil.org/ComplexRomanFontFAQ). - -Many problems can be solved, or at least explained, through an understanding -of the encoding and use of the fonts. Here are some basic hints: - -Encoding: -The fonts are encoded according to Unicode, so your application must support -Unicode text in order to access letters other than the standard alphabet. -Most Windows applications provide basic Unicode support. You will, however, -need some way of entering Unicode text into your document. - -Keyboarding: -This font does not include any keyboarding helps or utilities. It uses the -built-in keyboards of the operating system. You will need to install the -appropriate keyboard and input method for the characters of the language you -wish to use. If you want to enter characters that are not supported by any -system keyboard, the Keyman program (www.tavultesoft.com) can be helpful -on Windows systems. Also available for Windows is MSKLC -(http://www.microsoft.com/globaldev/tools/msklc.mspx). -For other platforms, KMFL (http://kmfl.sourceforge.net/), -XKB (http://www.x.org/wiki/XKB) or Ukelele (http://scripts.sil.org/ukelele) -can be helpful. - -If you want to enter characters that are not supported by any system -keyboard, and to access the full Unicode range, we suggest you use -gucharmap, kcharselect on Ubuntu or similar software. - -Another method of entering some symbols is provided by a few applications such -as Adobe InDesign or LibreOffice.org. They can display a glyph palette or input -dialog that shows all the glyphs (symbols) in a font and allow you to enter -them by clicking on the glyph you want. - -Rendering: -This font is designed to work with any of two advanced font technologies, -Graphite or OpenType. To take advantage of the advanced typographic -capabilities of this font, you must be using applications that provide an -adequate level of support for Graphite or OpenType. See "Applications -that provide an adequate level of support for SIL Unicode Roman fonts" -(http://scripts.sil.org/Complex_AdLvSup). - - -CONTACT -======== -For more information please visit the Charis SIL page on SIL International's -Computers and Writing systems website: -http://scripts.sil.org/CharisSILfont - -Support through the website: http://scripts.sil.org/Support diff --git a/Src/views/Test/TestUniscribeEngine.h b/Src/views/Test/TestUniscribeEngine.h index 859ee2dc37..47b0b6b08b 100644 --- a/Src/views/Test/TestUniscribeEngine.h +++ b/Src/views/Test/TestUniscribeEngine.h @@ -201,7 +201,7 @@ namespace TestViews pchLastSlash != NULL); *(pchLastSlash + 1) = 0; wcscat_s(rgchPath, _countof(rgchPath), - L"TestData\\Fonts\\CharisSIL-5.000\\CharisSIL-R.ttf"); + L"TestData\\Fonts\\CharisSIL\\CharisSIL-Regular.ttf"); DWORD dwAttributes = ::GetFileAttributesW(rgchPath); unitpp::assert_true("Charis SIL test font should be copied beside TestViews.exe", @@ -324,15 +324,19 @@ namespace TestViews unitpp::assert_true("Charis SIL test font should load", font.Loaded()); SetDefaultFontForTest(L"Charis SIL"); - int dxWithoutLigatures = MeasureTextWithFeatures(L"office official affinity", L"liga=0"); - int dxWithLigatures = MeasureTextWithFeatures(L"office official affinity", L"liga=1"); + // Small caps replace lowercase letters with glyphs of different advance widths, so the + // measured segment width changes. (The liga feature was previously used here, but in + // Charis SIL 6.x the fi/ffi ligatures keep the component advance widths, so liga changes + // the rendered glyphs without changing segment metrics.) + int dxWithoutSmallCaps = MeasureTextWithFeatures(L"small caps verify", L"smcp=0"); + int dxWithSmallCaps = MeasureTextWithFeatures(L"small caps verify", L"smcp=1"); unitpp::assert_true("OpenType feature-off segment width should be positive", - dxWithoutLigatures > 0); + dxWithoutSmallCaps > 0); unitpp::assert_true("OpenType feature-on segment width should be positive", - dxWithLigatures > 0); - unitpp::assert_true("Charis SIL liga feature should change segment metrics", - dxWithoutLigatures != dxWithLigatures); + dxWithSmallCaps > 0); + unitpp::assert_true("Charis SIL smcp feature should change segment metrics", + dxWithoutSmallCaps != dxWithSmallCaps); #endif } diff --git a/Src/views/Test/TestViews.vcxproj b/Src/views/Test/TestViews.vcxproj index 278af98953..8a85f8bfe7 100644 --- a/Src/views/Test/TestViews.vcxproj +++ b/Src/views/Test/TestViews.vcxproj @@ -423,9 +423,6 @@ - - - @@ -442,16 +439,20 @@ WorkingDirectory="$(ProjectDir)" /> - - - - - - + + + 6.200 + $(FwRoot)\Downloads\CharisSIL\CharisSIL-$(CharisSilTestFontVersion)\CharisSIL-Regular.ttf + - + diff --git a/Src/views/Test/TestViews.vcxproj.filters b/Src/views/Test/TestViews.vcxproj.filters index b45dfb2065..f3dbf5fb51 100644 --- a/Src/views/Test/TestViews.vcxproj.filters +++ b/Src/views/Test/TestViews.vcxproj.filters @@ -139,15 +139,6 @@ Resource Files - - Resource Files - - - Resource Files - - - Resource Files -