Add test cases for composition and symbol font handling.

master
Torsten Paul 2014-07-07 20:06:33 +02:00
parent d413e4695b
commit 0a5acbde25
19 changed files with 328 additions and 0 deletions

View File

@ -0,0 +1,7 @@
use <../../ttf/liberation-2.00.1/LiberationSans-Regular.ttf>
// Validate correct behavior with overlapping combining chars.
// The U+030A (COMBINING RING ABOVE) should be unioned to the
// letter and not generate a hole where the A and the ring
// overlap.
text(t = "A\u030a", font = "Liberation Sans", size = 40);

View File

@ -0,0 +1,26 @@
use <../../ttf/marvosym-3.10/marvosym.ttf>
use <../../ttf/liberation-2.00.1/LiberationSans-Regular.ttf>
use <../../ttf/amiri-0.106/amiri-regular.ttf>
// FIXME: Needs a freely distributable font that is encoded like Webdings
// FIXME: with Microsoft/System charmap and charcodes at 0xf000. Using
// FIXME: Amiri as placeholder for now...
o = 180;
t = [ "0123", "ABCD", "abcd" ];
f = [ "MarVoSym", /* "Webdings" */ "Amiri", "Liberation Sans" ];
// Validate that windows symbol fonts are handled correctly.
// When following the suggested encoding, the charmap is defined
// to use the charcodes at the 0xf000 private use area of Unicode.
// This is true for Webdings and Wingdings, other fonts ignore
// that, e.g. the MarVoSym has the charcodes in the normal places.
// Liberation Sans is just added as cross check that normal
// Unicode encoding also works.
for (a = [0 : len(f) - 1]) {
for (b = [0 : len(t) - 1]) {
translate([o * a - o, 10 + 60 * b]) {
text(t[b], font = f[a], size = 40, halign = "center");
}
}
}

12
testdata/ttf/liberation-2.00.1/AUTHORS vendored Normal file
View File

@ -0,0 +1,12 @@
AUTHORS
Current Contributors (sorted alphabetically):
- Pravin Satpute <psatpute at redhat dot com>
Project Owner (Current)
Red Hat, Inc.
Previous Contributors
- Steve Matteson
Original Designer
Ascender, Inc.

View File

@ -0,0 +1,14 @@
* Thu Oct 04 2012 Pravin Satpute <psatpute AT redhat DOT com>
- Resolved "Glyphs with multiple unicode encodings inhibit subsetting" #851790
- Resolved #851791, #854601 and #851825
- Following GASP table version as per Liberation old version. (Anti-aliasing disabled)
- Added support for Serbian glyphs for wikipedia #657849
- In Monospace fonts, isFixedPitch bit set via script for getting it recognized as Monospace in putty.exe
* Fri Jul 06 2012 Pravin Satpute <psatpute AT redhat DOT com>
- Initial version of Liberation fonts based on croscore fonts version 1.21.0
- Converted TTF files into SFD files to be open source.
- Update Copyright and License file
- set fsType bit to 0, Installable Embedding is allowed.
- Absolute value in HHeadAscent/Descent values for maintaining Metric compatibility.

102
testdata/ttf/liberation-2.00.1/LICENSE vendored Normal file
View File

@ -0,0 +1,102 @@
Digitized data copyright (c) 2010 Google Corporation
with Reserved Font Arimo, Tinos and Cousine.
Copyright (c) 2012 Red Hat, Inc.
with Reserved Font Name Liberation.
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.

Binary file not shown.

80
testdata/ttf/liberation-2.00.1/README vendored Normal file
View File

@ -0,0 +1,80 @@
1. What's this?
=================
The Liberation Fonts is font collection which aims to provide document
layout compatibility as usage of Times New Roman, Arial, Courier New.
2. Requirements
=================
* fontforge is installed.
(http://fontforge.sourceforge.net)
3. Install
============
3.1 Decompress tarball
You can extract the files by following command:
$ tar zxvf liberation-fonts-[VERSION].tar.gz
3.2 Build from the source
Change into directory liberation-fonts-[VERSION]/ and build from sources by
following commands:
$ cd liberation-fonts-[VERSION]
$ make
The built font files will be available in 'build' directory.
3.3 Install to system
For Fedora, you could manually install the fonts by copying the TTFs to
~/.fonts for user wide usage, or to /usr/share/fonts/truetype/liberation
for system-wide availability. Then, run "fc-cache" to let that cached.
For other distributions, please check out corresponding documentation.
4. Usage
==========
Simply select preferred liberation font in applications and start using.
5. License
============
This Font Software is licensed under the SIL Open Font License,
Version 1.1.
Please read file "LICENSE" for details.
6. For Maintainers
====================
Before packaging a new release based on a new source tarball, you have to
update the version suffix in the Makefile:
VER = [VERSION]
Make sure that the defined version corresponds to the font software metadata
which you can check with ftinfo/otfinfo or fontforge itself. It is highly
recommended that file 'ChangeLog' is updated to reflect changes.
Create a tarball with the following command:
$ make dist
The new versioned tarball will be available in the dist/ folder as
'liberation-fonts-[NEW_VERSION].tar.gz'.
7. Credits
============
Please read file "AUTHORS" for list of contributors.

5
testdata/ttf/liberation-2.00.1/TODO vendored Normal file
View File

@ -0,0 +1,5 @@
Here are todo for next release
1) Serbian glyph for wikipedia https://bugzilla.redhat.com/show_bug.cgi?id=657849
- Improving shape of S_BE https://bugzilla.redhat.com/show_bug.cgi?id=657849#c96
2) Liberation Mono not recognizing as Mono in Windows application #861003
- presently it is patch, we have to update zero width characters to fixed width

25
testdata/ttf/marvosym-3.10/FILE_ID.DIZ vendored Normal file
View File

@ -0,0 +1,25 @@
MARVOSYM.TTF Version 3.10
Free Windows True type symbol font
for school and office: fax machine, Euro
currency symbols, CE-symbol, answering
machine, peace dove, textile care
symbols, biohazard, coffee cup,
e-mail-symbols, cellular phone,
corresponds-to-sign, restroom symbols,
scissors and cutting lines, civil
engineering symbols, and loads more!
You can download the latest version
from http://www.marvosym.com
MARVOSYM.TTF Version 3.10
Kostenlose Symbole fuer Schule, Studium
und Buero im Windows True Type Format:
Fax, Euro-Logo, CE-Pruefzeichen,
Anrufbeantworter, Friedenstaube,
Waeschesymbole, Entspricht-Zeichen,
Kaffeetasse, Handy, Scherensymbole,
statische Kraft- und Auflagersymbole,
Stahlbauprofile, Vektorpfeile u.v.m.
Die jeweils aktuellste Version gibt es
auf http://www.marvosym.de

19
testdata/ttf/marvosym-3.10/liesmich.txt vendored Normal file
View File

@ -0,0 +1,19 @@
MarVoSym.ttf unterliegt der SIL Open Font Lizenz, Version 1.1.
Die Bedingungen dieser Lizenz sind einsehbar unter
http://scripts.sil.org/OFL
Die wichtigsten Punkte aus dieser Lizenz:
- Der Font darf kostenlos verwendet und weitergegeben werden.
- Sie dürfen den Font verändern und für Ihre eigenen Zwecke anpassen.
- Sie dürfen abgeleitete Werke herstellen - beispielsweise TeX-Fontpakete.
Wenn Sie Vorschlaege fuer weitere Symbole haben, wenden Sie sich
einfach an den Autor:
Martin Vogel
Stockumer Str. 445
44227 Dortmund
Deutschland
mail@martinvogel.de

BIN
testdata/ttf/marvosym-3.10/marvosym.ttf vendored Normal file

Binary file not shown.

36
testdata/ttf/marvosym-3.10/readme.txt vendored Normal file
View File

@ -0,0 +1,36 @@
MARVOSYM.TTF
~~~~~~~~~~~~
1. The purpose
~~~~~~~~~~~~~~
The Windows True Type Symbol Font MARVOSYM.TTF is a valuable
addition for any office or civil engineering purpose. It contains
often-needed but rarely available symbols as Fax Machine, Answering
Machine, Cellular Phone, Steel Profile Symbols, the original Euro
Currency Symbol and lots more.
2. How to install
~~~~~~~~~~~~~~~~~
In Windows XP, all you need to do is to copy MARVOSYM.TTF into the
directory C:\WINDOWS\FONTS. Alternatively, you can follow the menu
path Start / Settings / Control Panel / Fonts / File / Install New
Font. In Ubunbtu Linux, type
sudo cp marvosym.ttf /usr/share/fonts/truetype at the console.
3. The status
~~~~~~~~~~~~~
MarVoSym.ttf is licensed under the SIL Open Font License, Version 1.1.
This license is available with a FAQ at http://scripts.sil.org/OFL
4. The distribution status
~~~~~~~~~~~~~~~~~~~~~~~~~~
The Archive MARVOSYM.ZIP is freely distributable.
The latest version of the file can be downloaded from
http://www.marvosym.de
5. How to contact the author in the event of questions or problems.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can contact me by e-mail: mail@martinvogel.de
6. Known problems
~~~~~~~~~~~~~~~~~
None :-)

View File

@ -1131,6 +1131,8 @@ list(APPEND EXPERIMENTAL_TEXT_FILES
${CMAKE_SOURCE_DIR}/../testdata/scad/experimental/text-font-direction-tests.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/experimental/text-font-simple-tests.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/experimental/text-font-tests.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/experimental/text-font-composition.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/experimental/text-font-symbol.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/experimental/text-search-test.scad)
add_cmdline_test(cgalpngtest EXE ${OPENSCAD_BINPATH} ARGS --render --enable=text -o SUFFIX png FILES ${EXPERIMENTAL_TEXT_FILES})

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB