summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
ksakamoto@chromium.org [Wed, 8 May 2013 03:39:15 +0000 (03:39 +0000)]
[OTS] Fix WOFF2 decode error
Fix a bug that woff2 decoder fails to reconstruct glyf table
when glyf table of original file was aligned to 2-byte boundaries.
Before this patch, ReconstructGlyf() aligned glyf entries to 4-byte
boundaries (which is a recommendation of the OpenType format, but not required).
But the encoder stores original size of glyf table into woff2 header, so reconstructed
glyf table become larger than the expected size, and cause decode error.
This patch makes ReconstructGlyf() to generate 2-byte aligned glyf table.
R=yusukes@chromium.org
Review URL: https://codereview.chromium.org/
14758005
git-svn-id: http://ots.googlecode.com/svn/trunk@101
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
ksakamoto@chromium.org [Wed, 8 May 2013 01:20:29 +0000 (01:20 +0000)]
[OTS] Integrate WOFF 2.0 algorithm into OTS
Add woff2.h and woff2.cc from the WOFF 2.0 reference implementation
(https://code.google.com/p/font-compression-reference/).
WOFF2 support is disabled by default and is enabled by ots::EnableWOFF2().
Patch originally by bashi@chromium.org.
BUG=122603
R=yusukes@chromium.org
Review URL: https://codereview.chromium.org/
13918002
git-svn-id: http://ots.googlecode.com/svn/trunk@100
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
ksakamoto@chromium.org [Wed, 3 Apr 2013 08:32:41 +0000 (08:32 +0000)]
[OTS] Make standalone tools compile on Mac
- ATS Fonts is deprecated. Use CTFont instead.
- Removed an unused function.
Review URL: https://codereview.chromium.org/
13449003/
Review URL: https://codereview.chromium.org/
13449003
git-svn-id: http://ots.googlecode.com/svn/trunk@99
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
ksakamoto@chromium.org [Tue, 2 Apr 2013 01:43:21 +0000 (01:43 +0000)]
[OTS] Fix standalone tools build
- Assume zlib is placed in third_party/zlib on windows
- ot-sanitize did not use binary IO mode on windows
- Tweaks to ots-standalone.gyp
Reivew URL: https://codereview.chromium.org/
13323005/
git-svn-id: http://ots.googlecode.com/svn/trunk@98
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
yusukes@chromium.org [Sat, 19 Jan 2013 04:40:57 +0000 (04:40 +0000)]
Remove <(library) usage from ots.gyp.
Patch-by: tfarina@chromium.org
BUG=111541
R=yusukes@chromium.org
Review URL: https://codereview.chromium.org/
11938029/
git-svn-id: http://ots.googlecode.com/svn/trunk@97
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
jshin@chromium.org [Tue, 15 Jan 2013 23:23:29 +0000 (23:23 +0000)]
Make ots compile on Win64
patch by jschuh
R=bashi
BUG=chromium:166496,chromium:167187
TEST=Chrome can be compile on Windows 64
Reivew URL: https://codereview.chromium.org/
11684006/
git-svn-id: http://ots.googlecode.com/svn/trunk@96
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Tue, 4 Sep 2012 04:36:11 +0000 (04:36 +0000)]
cmap ParseFormat4() should check the first segment
R=yusukes@chromium.org,agl@chromium.org
BUG=chromium:146254
TEST=ran test/test_{un,}malicious_fonts.sh
Review URL: https://chromiumcodereview.appspot.com/
10913058
git-svn-id: http://ots.googlecode.com/svn/trunk@95
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Tue, 26 Jun 2012 19:58:38 +0000 (19:58 +0000)]
Mark LZMA files as public domain.
These files need to be marked in such a way that the licensecheck.pl script
recognises the license.
git-svn-id: http://ots.googlecode.com/svn/trunk@94
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Tue, 26 Jun 2012 14:47:24 +0000 (14:47 +0000)]
Ignore layout ranges that overlap by a single element.
BUG=134135
Review URL: https://chromiumcodereview.appspot.com/
10666034
git-svn-id: http://ots.googlecode.com/svn/trunk@93
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Tue, 5 Jun 2012 10:03:51 +0000 (10:03 +0000)]
[OTS] Strictly check table padding for WOFF files
Checks table boundaries strictly in the WOFF path in compliance with the spec.
This CL make OTS pass all W3C WOFF "User Agent" tests.
I also checked the CL doesn't reject the takao TTF fonts, which don't have
zero-padding in the last table.
BUG=chromium:109813,chromium:47960
TEST=ran test_{un,}malicious_fonts.sh
Review URL: https://chromiumcodereview.appspot.com/
10518005
git-svn-id: http://ots.googlecode.com/svn/trunk@92
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Tue, 15 May 2012 08:57:19 +0000 (08:57 +0000)]
Removed TAG() macro and revived Tag() function for big endian platform.
BUG=124629
TEST=ran test_{un,}malicious_fonts.sh
Review URL: https://chromiumcodereview.appspot.com/
10273021
git-svn-id: http://ots.googlecode.com/svn/trunk@91
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Mon, 7 May 2012 08:45:16 +0000 (08:45 +0000)]
[OTS] Improve GYP build
- Added gyp_ots script which fetches gyp and creates build files.
- Cleanup ots-standalone.gyp and added further test program targets.
- Fixed some compile errors of test programs on Mac.
Review URL: https://chromiumcodereview.appspot.com/
10314003
git-svn-id: http://ots.googlecode.com/svn/trunk@90
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Wed, 2 May 2012 00:18:22 +0000 (00:18 +0000)]
[OTS] Add lzma_sdk for standalone build
Add lzma sdk 9.20 for standalone build. These are not used when OTS is compiled
as a part of Chromium.
BUG=chromium:122603
TEST=compiled
Review URL: https://chromiumcodereview.appspot.com/
10273025
git-svn-id: http://ots.googlecode.com/svn/trunk@89
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Wed, 25 Apr 2012 00:18:15 +0000 (00:18 +0000)]
[OTS] TAG() macro for big endian
Add TAG() macro for big endian.
BUG=chromium:124629
TEST=ran test_{un,}malicious_fonts.sh
Review URL: https://chromiumcodereview.appspot.com/
10205009
git-svn-id: http://ots.googlecode.com/svn/trunk@88
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Tue, 3 Apr 2012 08:11:30 +0000 (08:11 +0000)]
[OTS] Fails to Reject CID Fonts When Top Dict is Ordered Incorrectly
If an ROS entry appears in the top directory, it should start with the
ROS entry.
BUG=chromium:117265
TEST=ran test_{un,}malicious_fonts.sh. Checked bad_cid_font.otf which attached at http://crbug.com/117265 was rejected by idempotent.
Review URL: https://chromiumcodereview.appspot.com/9923001
git-svn-id: http://ots.googlecode.com/svn/trunk@87
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Wed, 21 Mar 2012 05:37:02 +0000 (05:37 +0000)]
[OTS] Remove redundant "else if" in cff.cc
BUG=chromium:93655
TEST=ran test_{un,}malicious_fonts.sh
Review URL: https://chromiumcodereview.appspot.com/9796014
git-svn-id: http://ots.googlecode.com/svn/trunk@84
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Sat, 3 Mar 2012 11:08:05 +0000 (11:08 +0000)]
[OTS] Fix off-by-one in GSUB/GPOS parser
Use the number of cells in the sub-parser table for number of lookup type.
BUG=chromium:116524
TEST=ran test_{un,}malicious_fonts.sh
Review URL: http://codereview.chromium.org/9581044
git-svn-id: http://ots.googlecode.com/svn/trunk@83
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Fri, 24 Feb 2012 18:05:29 +0000 (18:05 +0000)]
Remove dependency on winsock2 (ws2_32.dll) on Windows.
Use intrinsics for byte order conversion, per suggestion by maruel.
Are there any other opentype tests to verify functionality? Wiki page
says I need security team access to get the malicious fonts.
Patch-by: dcurtis
BUG=115477
TEST=No longer crashes with new ffmpeg.
git-svn-id: http://ots.googlecode.com/svn/trunk@82
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Thu, 23 Feb 2012 23:36:04 +0000 (23:36 +0000)]
[OTS] Allow empty Private DICT inside CFF data
BUG=chromium:112414
TEST=ran test_{un,}malicious_fonts.sh
Review URL: https://chromiumcodereview.appspot.com/9447013
git-svn-id: http://ots.googlecode.com/svn/trunk@81
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
yusukes@chromium.org [Tue, 24 Jan 2012 07:03:12 +0000 (07:03 +0000)]
Use memcpy() instead of violating strict-aliasing rules.
(This is the approach suggested by the standard.
Modern compilers inline memcpy anyway.)
Patch-by: evan
http://codereview.chromium.org/9117014/
git-svn-id: http://ots.googlecode.com/svn/trunk@80
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Tue, 17 Jan 2012 00:04:57 +0000 (00:04 +0000)]
Adds woff header checks
Add some woff header checks to pass W3C WOFF User Agent test suite.
http://w3c-test.org/framework/suite/woff-ua/
The following testcases should pass by adding this checks.
- blocks-extraneous-data-00[1-7]
- blocks-overlap-00[1-3]
- directory-extraneous-data-001
- directory-overlaps-00[34]
- header-totalSfntSize-00[13]
The CL will make OTS pass all testcases execpt for directory-4-byte-002.
OTS intentionally doesn't pass directory-4-byte-002 to workaround a font
generator bug. See http://crbug.com/47960 for details.
BUG=chromium:109813
TEST=Checked 291 testcases at http://w3c-test.org/framework/suite/woff-ua/ manually.
Review URL: http://codereview.chromium.org/9193002/
git-svn-id: http://ots.googlecode.com/svn/trunk@79
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Fri, 6 Jan 2012 16:50:53 +0000 (16:50 +0000)]
[OTS] OOB read in checking the end of table
Remove Round4 calls for checking the length of the table.
I ran idempotent with the font file that have invalid table length and checked OTS can detect it.
BUG=chromium:109358
TEST=ran test_{un,}malicious_fonts.sh
Review URL: http://codereview.chromium.org/9108034/
git-svn-id: http://ots.googlecode.com/svn/trunk@78
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Mon, 19 Dec 2011 23:47:35 +0000 (23:47 +0000)]
[OTS] Fix incorrect parsing/validation of the empty CFF index
Don't add extra 2bytes when parsing an empty INDEX.
BUG=chromium:106651
TEST=ran test_{un,}malicious_fonts.sh
Review URL: http://codereview.chromium.org/8953024/
git-svn-id: http://ots.googlecode.com/svn/trunk@77
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Fri, 9 Dec 2011 19:19:42 +0000 (19:19 +0000)]
Remove all 51 static initializers from ots.cc.
BUG=chromium:94925
Patch-by: Nico
http://codereview.chromium.org/8896006
git-svn-id: http://ots.googlecode.com/svn/trunk@76
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Wed, 30 Nov 2011 01:59:49 +0000 (01:59 +0000)]
[OTS] sanitizer incorrectly rejects fonts with optical size feature ('size')
Fix a wrong calculation of FeatureTable length.
The patch is provided by jfkthame.
TEST=ran test_{un,}malicious_fonts.sh
BUG=104389
git-svn-id: http://ots.googlecode.com/svn/trunk@75
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Wed, 21 Sep 2011 06:29:58 +0000 (06:29 +0000)]
Sort NameRecords in name table if they are not sorted.
Also adds src/name.h to ots_souces in ots-common.gypi.
Review url: http://codereview.chromium.org/7976019/
git-svn-id: http://ots.googlecode.com/svn/trunk@74
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Fri, 16 Sep 2011 00:38:15 +0000 (00:38 +0000)]
Support name table.
Patch from Mozilla. See http://crbug.com/83706 for details.
The patch is modified to match OTS coding sytle.
BUG=83706
R=agl@chromium.org
TEST=ran test/test_{un,}malicious_fonts.sh
git-svn-id: http://ots.googlecode.com/svn/trunk@73
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Tue, 6 Sep 2011 16:52:23 +0000 (16:52 +0000)]
Typo fix.
http://code.google.com/p/chromium/issues/detail?id=83705
git-svn-id: http://ots.googlecode.com/svn/trunk@72
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Thu, 25 Aug 2011 05:38:57 +0000 (05:38 +0000)]
Fixing 2 typo bugs
This CL fixes two typo bugs reported at Chromium bug tracker:
- [OTS] font sanitizer incorrectly drops GDEF table in LinLibertine_Re-4.7.5.ttf
- [OTS] error in 'cmap' parser can crash the process using OTS
And, this CL modifies several boundary calculations to avoid overflow.
This CL also updates BLACKLIST.txt; some fonts have wrong offset in MarkAttachClassDef field of GDEF header table.
R=yusukes@chromium.org,agl@chromium.org
BUG=80797,93654
TEST=ran test_{un,}malicious_fonts.sh
git-svn-id: http://ots.googlecode.com/svn/trunk@71
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Fri, 5 Aug 2011 15:23:27 +0000 (15:23 +0000)]
Remove unused function: ParseSubstLookupRecord
git-svn-id: http://ots.googlecode.com/svn/trunk@70
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
yusukes@chromium.org [Tue, 7 Jun 2011 05:25:38 +0000 (05:25 +0000)]
Added missing include to os2.cc.
os2.cc uses stddef.h's offsetof().
Original review: http://codereview.chromium.org/7113013/
git-svn-id: http://ots.googlecode.com/svn/trunk@69
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Mon, 6 Jun 2011 13:47:33 +0000 (13:47 +0000)]
Fix GCC 4.6 compile
Patch-by: rsleevi
http://codereview.chromium.org/7113001/
git-svn-id: http://ots.googlecode.com/svn/trunk@68
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Tue, 31 May 2011 07:38:53 +0000 (07:38 +0000)]
Include cstddef in ots.h to fix compilation with gcc4.6
Patch from cmonde@gmail.com.
git-svn-id: http://ots.googlecode.com/svn/trunk@67
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Mon, 30 May 2011 18:42:24 +0000 (18:42 +0000)]
Bug fix: + binds tighter than ?:
http://code.google.com/p/chromium/issues/detail?id=84137
git-svn-id: http://ots.googlecode.com/svn/trunk@66
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Tue, 5 Apr 2011 20:20:15 +0000 (20:20 +0000)]
Fix compile failure with Solaris Studio on Solaris.
Add typecasts for make_pair().
Patch from ginnchen@gmail.com.
BUG=67120
TEST=http://code.google.com/p/ots/wiki/HowToTestOts (Verified with ~4000 TrueType/OpenType fonts)
git-svn-id: http://ots.googlecode.com/svn/trunk@64
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Mon, 4 Apr 2011 16:42:56 +0000 (16:42 +0000)]
Allowing consecutive identical offsets in CFF String INDEX.
Allows conscutive identical offsets in CFF String INDEX to accept having
zero-length strings.
BUG=69341
TEST=ttp://code.google.com/p/ots/wiki/HowToTestOts (Verified with ~4000 TrueType/OpenType fonts)
git-svn-id: http://ots.googlecode.com/svn/trunk@62
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Mon, 28 Mar 2011 20:51:38 +0000 (20:51 +0000)]
dd vhea/vmtx table support.
- Added vhea.{cc,h} and vmtx.{cc,h}.
- Added metrics.{cc,h} to integrate common functions of hhea/hmtx and vhea/vmtx.
- Moved functions in hhea.cc to metrics.cc.
BUG=77386
TEST=http://code.google.com/p/ots/wiki/HowToTestOts (verified with 3500+ font files)
TEST=test/table_dependencies_test.cc
git-svn-id: http://ots.googlecode.com/svn/trunk@61
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Wed, 23 Mar 2011 06:08:30 +0000 (06:08 +0000)]
Add {GPOS,GSUB}_TYPE_ prefix to enum constants.
To avoid identifier conflicts with a macro which is defined by MSVC.
All enum constants defined in gpos.cc and gsub.cc follow the same manner to ensure consistency.
BUG=77127
TEST=ran test/layout_common_table_test and test/test_{un,}malicious_fonts.sh with 4000+ fonts.
git-svn-id: http://ots.googlecode.com/svn/trunk@60
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Tue, 22 Mar 2011 19:02:34 +0000 (19:02 +0000)]
Add lookup flag validation check.
Checks existence of Glyph class definition table in GDEF table if bits of lookup flags which require the table are set.
BUG=76943
TEST=test/layout_common_table_test.cc
git-svn-id: http://ots.googlecode.com/svn/trunk@59
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Fri, 18 Mar 2011 17:48:29 +0000 (17:48 +0000)]
OTS: Add GSUB table support.
- Added src/gsub.{cc,h} for supporting GSUB table.
- Many fonts don't arrange script and feature tags in alphabetical order and
it might not be a security issue so no longer treat it as an error.
BUG=27131
TEST=http://code.google.com/p/ots/wiki/HowToTestOts (Verified with ~4000 TrueType/OpenType fonts)
TEST=Confirmed that chrome can render the W3C font tests[1] for TTF font linking of Complex scripts(Khmer and Devanagari) as expected by hand.
[1] http://www.w3.org/International/tests/tests-html-css/list-fonts
git-svn-id: http://ots.googlecode.com/svn/trunk@57
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Fri, 25 Feb 2011 08:33:29 +0000 (08:33 +0000)]
Defines 'NOMINMAX' in GYP file.
When ots is built as a part of Chromium, 'NOMINMAX' macro will be provided by
command-line arguments. This involves macro redefinition when we define
'NOMINMAX' in source code. To avoid this, we define it in gyp file.
BUG=73805
TEST=built ots as a part of Chromium on local windows machine.
git-svn-id: http://ots.googlecode.com/svn/trunk@56
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Wed, 23 Feb 2011 04:12:49 +0000 (04:12 +0000)]
Add check for size of vectors.
BUG=73393
TEST=existing unittests will cover the bug.
git-svn-id: http://ots.googlecode.com/svn/trunk@55
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Wed, 23 Feb 2011 00:22:24 +0000 (00:22 +0000)]
Uses push_back() to append items into vectors.
BUG=73393
TEST=none
git-svn-id: http://ots.googlecode.com/svn/trunk@54
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Fri, 18 Feb 2011 09:05:42 +0000 (09:05 +0000)]
Support stand-alone build.
Separated gyp file for chromium build and stand-alone build.
A test tool (idempotent) would be able to build on Windows by applying this CL.
BUG=72546
TEST=Executed idempotent.exe with some malformed/unmalformed fonts and ensured the results.
git-svn-id: http://ots.googlecode.com/svn/trunk@53
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@chromium.org [Thu, 17 Feb 2011 10:23:47 +0000 (10:23 +0000)]
Add GPOS table support.
- Added src/gpos.{cc,h} for supporting GPOS table.
- Some lookup type subtables (e.g. context positioning subtable and chaining
contexual positioning subtable) have the same structure as those in GSUB
table. So I implemented such lookup type subtable parsers in lookup.cc.
These will also be used for parsing GSUB table when I add GSUB support.
- In parsing ClassDefFormat, we now allow class value is 0 because there is no
reason to reject such value.
- Changed some interface/implementation of parsing lookup list table to make
them more clear.
As far as I checked, some fonts contain invalid GPOS table and OTS will drop
GPOS table of them. See comments in gpos.cc for more detail.
BUG=27131
TEST=http://code.google.com/p/ots/wiki/HowToTestOts (Verified with ~4000 TrueType/OpenType fonts)
git-svn-id: http://ots.googlecode.com/svn/trunk@52
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@google.com [Mon, 7 Feb 2011 06:21:25 +0000 (06:21 +0000)]
dds more layout common table supports.
Added Script table, Featre table, Lookup table, and Device table support. This is a part of adding GPOS/GSUB table support. The CL also contains unittests for layout common tables. Some fix for bugs which detected by the unittests also included.
Review: http://codereview.chromium.org/6410047/
BUG=27131
TEST=test/layout_common_table_test.cc
git-svn-id: http://ots.googlecode.com/svn/trunk@51
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@google.com [Mon, 31 Jan 2011 23:36:59 +0000 (23:36 +0000)]
Fix MSVC compiler warning.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/6386020/
git-svn-id: http://ots.googlecode.com/svn/trunk@50
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@google.com [Thu, 27 Jan 2011 06:35:42 +0000 (06:35 +0000)]
Add GDEF support.
Adds src/gdef.{h,cc} for GDEF table support.
This CL also adds src/layout.{h,cc} that implement utility functions for OpenType layout common table formats.
BUG=27131
TEST=ran test_{,un}malicious_fonts.sh for 4500+ OpenType fonts.
git-svn-id: http://ots.googlecode.com/svn/trunk@49
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
jshin@chromium.org [Sat, 22 Jan 2011 02:07:39 +0000 (02:07 +0000)]
Change svn:ignore prop from A. to B. below:
A.
*.scons
*.mk
*.xcodeproj
B.
ots.Makefile
ots.sln
ots.target.mk
ots.vcproj
ots.xcodeproj
Patch by pkasting@chromium.org
BUG=NONE
TEST=NONE
git-svn-id: http://ots.googlecode.com/svn/trunk@48
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Fri, 21 Jan 2011 17:19:34 +0000 (17:19 +0000)]
Fix MSVC compiler warnings.
After r46 we have to build under stricter compiler flags on Windows. This fixes
the seemingly stupid warning:
forcing value to bool 'true' or 'false' (performance warning)
git-svn-id: http://ots.googlecode.com/svn/trunk@47
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@google.com [Thu, 20 Jan 2011 23:54:48 +0000 (23:54 +0000)]
Don't include chromiums's common.gypi directly to follow the convention.
git-svn-id: http://ots.googlecode.com/svn/trunk@46
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Wed, 12 Jan 2011 16:34:40 +0000 (16:34 +0000)]
Fix compilation on mingw.
Patch by: cjacek
http://codereview.chromium.org/6024011
git-svn-id: http://ots.googlecode.com/svn/trunk@45
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@google.com [Fri, 24 Dec 2010 00:29:23 +0000 (00:29 +0000)]
Adds OTS UVSes support.
Adds parsing/sanitising features for cmap subtable format 14 to support
UVSes in OTS. This change also changes the way to output cmap table.
0-3-4 table is no longer written as a 3-1-4 table since some fonts which
include 0-5-14 table seems to require 0-3-4 table.
Following fonts were used to test UBSes support:
- IPAex fonts
http://ossipedia.ipa.go.jp/ipafont/index.html
- Mozilla's test font for UVSes
http://mxr.mozilla.org/mozilla-central/source/layout/reftests/fonts/gw432047.ttf
BUG=66778
TEST=Ran ots/test/test_{un,}malicious_fonts.sh on Linux with various fonts and checked any errors are reported.
git-svn-id: http://ots.googlecode.com/svn/trunk@44
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@google.com [Wed, 22 Dec 2010 07:23:26 +0000 (07:23 +0000)]
Accepts fonts that are not to add 0-padding at the final table.
Some fonts automatically generated by a font generator, called TTX,
seems to not to add 0-padding to the final table so OTS will reject
these fonts. The table should be 0-padded, but it would be OK to accept
these fonts. This change makes OTS accept such fonts.
BUG=47960
TEST=Follow the steps described in the issue and make sure the web page is rendered using the Takao font.
git-svn-id: http://ots.googlecode.com/svn/trunk@43
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
bashi@google.com [Fri, 17 Dec 2010 07:12:28 +0000 (07:12 +0000)]
Add codereview.settings
git-svn-id: http://ots.googlecode.com/svn/trunk@42
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Wed, 20 Oct 2010 20:06:53 +0000 (20:06 +0000)]
Revert r36 and r37
git-svn-id: http://ots.googlecode.com/svn/trunk@39
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Fri, 8 Oct 2010 15:33:40 +0000 (15:33 +0000)]
Validate format 14 CMAP subtables
Patch based on work by jfkthame (Mozilla).
http://code.google.com/p/chromium/issues/detail?id=57766
git-svn-id: http://ots.googlecode.com/svn/trunk@37
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
yusukes@chromium.org [Fri, 8 Oct 2010 01:52:15 +0000 (01:52 +0000)]
Fix code portability issues.
(a) Trailing commas in enumerations at src/cff.cc (enum DICT_OPERAND_TYPE and enum DICT_DATA_TYPE) and src/cff_type2_charstring.h (enum Type2CharStringOperator). These are not strictly correct, and lead to compiler warnings or errors, depending on the specific compiler version and options being used.
(b) Some common headers, at least in a Windows environment, appear to #define macros for "min" and "max", leading to compilation failures in include/opentype-sanitiser.h where these names are used with the explicit std:: namespace prefix. This seems to me like a flaw in the headers I'm using, which should not define such macros in a C++ environment, but a simple workaround is to #undef the names after including the windows headers.
Review URL: http://code.google.com/p/chromium/issues/detail?id=53821
Patch from Jonathan Kew (Mozilla)
git-svn-id: http://ots.googlecode.com/svn/trunk@36
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
yusukes@chromium.org [Tue, 10 Aug 2010 01:36:03 +0000 (01:36 +0000)]
Addressed Tavis's comments in codereview.chromium.org/3023041/.
- Modified 4-bytes 16.16 Fixed-point number decoder in ReadNextNumberFromType2CharString().
- Fixed off-by-one error in ExecuteType2CharStringOperator().
- Fixed checks of 'div' and 'endchar' operators. They were not strict enough.
- Wrote ~1600 lines of test to verify if the modification above is valid.
- Moved Type2CharStringOperator enum definition from cff_type2_charstriung.cc tocff_type2_charstriung.h to write the unit tests.
Review: http://codereview.chromium.org/3027049
BUG=51070
TEST=http://code.google.com/p/ots/wiki/HowToTestOts (Verified that the modified OTS rejects all malformed fonts, and does not reject all non-malformed fonts. I tested ~3400 TrueType and ~450 OpenType fonts.)
TEST=ran cff_type2_charstring_test.
git-svn-id: http://ots.googlecode.com/svn/trunk@35
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
yusukes@chromium.org [Fri, 6 Aug 2010 03:27:28 +0000 (03:27 +0000)]
Validate font hinting code in OpenType CFF table.
The validation will fail if one of the following conditions is met:
1. The code uses more than 48 values of argument stack.
2. The code uses deeply nested subroutine calls (more than 10 levels.)
3. The code passes invalid number of operands to an operator.
4. The code calls an undefined global or local subroutine.
5. The code uses one of the following operators that are unlikely used in an ordinary fonts, and could be dangerous: random, put, get, index, roll.
Review: http://codereview.chromium.org/3023041
BUG=51070
TEST=http://code.google.com/p/ots/wiki/HowToTestOts (Verified that the modified OTS rejects all malformed fonts, and does not reject all non-malformed fonts. I tested ~3400 TrueType and ~450 OpenType fonts.)
git-svn-id: http://ots.googlecode.com/svn/trunk@34
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
yusukes@chromium.org [Thu, 15 Jul 2010 06:03:02 +0000 (06:03 +0000)]
Strict check for FDSelect in the CFF table
git-svn-id: http://ots.googlecode.com/svn/trunk@33
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
yusukes@chromium.org [Thu, 15 Jul 2010 06:02:28 +0000 (06:02 +0000)]
Strict check for FDSelect in the CFF table
git-svn-id: http://ots.googlecode.com/svn/trunk@32
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Wed, 14 Jul 2010 18:09:01 +0000 (18:09 +0000)]
Be stricter about the CFF table.
git-svn-id: http://ots.googlecode.com/svn/trunk@31
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Wed, 28 Apr 2010 21:44:05 +0000 (21:44 +0000)]
Update GYP file to depend on zlib.
(Trying to get Windows to build via try servers so there could be a few of
these changes before I'm done.)
git-svn-id: http://ots.googlecode.com/svn/trunk@30
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Wed, 28 Apr 2010 21:23:06 +0000 (21:23 +0000)]
Implement support for transcoding WOFF fonts.
Not all the test utilities will work with WOFF fonts since they tend
to get a lot larger after transcoding. I've updated |idempotent|, but
none of the others as our test suites of fonts are still in TTF format.
http://codereview.appspot.com/946044
git-svn-id: http://ots.googlecode.com/svn/trunk@29
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Tue, 27 Apr 2010 18:38:49 +0000 (18:38 +0000)]
Update the README with build instuctions
git-svn-id: http://ots.googlecode.com/svn/trunk@28
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Tue, 27 Apr 2010 18:37:36 +0000 (18:37 +0000)]
Fix a couple of warnings with GCC 4.4.
git-svn-id: http://ots.googlecode.com/svn/trunk@27
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
yusukes@chromium.org [Tue, 2 Feb 2010 21:26:17 +0000 (21:26 +0000)]
Add kern table support.
Review: http://codereview.chromium.org/524018
git-svn-id: http://ots.googlecode.com/svn/trunk@26
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
yusukes@chromium.org [Thu, 3 Dec 2009 10:25:32 +0000 (10:25 +0000)]
Upload test scripts for ots which I'm currently using.
- test_unmalicious_fonts.sh
Apply ots/test/idempotent to all TT/OT files under $BASEDIR in order to verify that:
* OTS does not reject unmalicious fonts.
* The new font OTS generates can be loaded by a system font renderer.
- test_malicious_fonts.sh
Apply ots/test/validator-checker to all malicious TT/OT files in order to verify that OTS can reject malicious fonts, or the "sanitized" font generated by OTS does not crash a system font renderer.
- test/validator-checker.cc
Add Mac support.
- test/idempotent.cc
Add Mac and FreeType2 support.
Example output:
yusukes@z-yusukes-jp:~/chromium/src/third_party/ots/test$ ./test_unmalicious_fonts.sh
................
FAIL: /usr/share/fonts/truetype/ttf-oriya-fonts/Samyak-Oriya.ttf (Run ./idempotent /usr/share/fonts/truetype/ttf-oriya-fonts/Samyak-Oriya.ttf for more information.)
........
yusukes@z-yusukes-jp:~/chromium/src/third_party/ots/test$
Review URL: http://codereview.chromium.org/408020
BUG=27139
TEST=see http://code.google.com/p/ots/wiki/HowToTestOts
TBR=jshin
git-svn-id: http://ots.googlecode.com/svn/trunk@24
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Tue, 1 Dec 2009 21:36:04 +0000 (21:36 +0000)]
Setting svn:ignore properties for make, scons, XCode (take two).
git-svn-id: http://ots.googlecode.com/svn/trunk@23
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
agl@chromium.org [Tue, 1 Dec 2009 21:33:18 +0000 (21:33 +0000)]
Setting svn:ignore properties for make, scons, XCode.
git-svn-id: http://ots.googlecode.com/svn/trunk@22
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
yusukes@chromium.org [Tue, 24 Nov 2009 02:17:27 +0000 (02:17 +0000)]
Fix a test tool for OTS, ot-sanitise.
Check if stdout is a regular file (and not a special file such as /dev/null and /dev/zero) in main() of test/ot-sanitise.cc.
Review URL: http://codereview.chromium.org/427014
BUG=27127
TEST=Run "./ot-sanitise
9de66fe4842edf59e46e15c90e686087.ttf > /dev/null" and verity that it does not trigger an assert failure.
git-svn-id: http://ots.googlecode.com/svn/trunk@19
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
yusukes@chromium.org [Mon, 23 Nov 2009 09:59:05 +0000 (09:59 +0000)]
An empty INDEX is not handled correctly.
Review URL: http://codereview.chromium.org/419002 (private mode)
BUG=27127
TEST=Run "./idempotent
5754b8aa8a95cc6d4e16e7e47ce0c315.ttf" and verify that the ttf file is rejected by the command.
git-svn-id: http://ots.googlecode.com/svn/trunk@18
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
yusukes@chromium.org [Thu, 12 Nov 2009 01:43:51 +0000 (01:43 +0000)]
Finished the initial internal review.
Review URL: http://go/mair
(reviewed by Jungshik Shin. r3 is also reviewed by him.)
BUG=17818
git-svn-id: http://ots.googlecode.com/svn/trunk@10
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
yusukes@chromium.org [Thu, 5 Nov 2009 00:07:54 +0000 (00:07 +0000)]
Moved ots.gyp from the Chromium tree to upstream following agl's suggestion:
http://codereview.chromium.org/363001
TBR=agl
git-svn-id: http://ots.googlecode.com/svn/trunk@4
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
yusukes@chromium.org [Wed, 4 Nov 2009 06:07:58 +0000 (06:07 +0000)]
support GCC 4.4
git-svn-id: http://ots.googlecode.com/svn/trunk@3
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
yusukes@chromium.org [Wed, 4 Nov 2009 04:56:32 +0000 (04:56 +0000)]
initial commit.
git-svn-id: http://ots.googlecode.com/svn/trunk@2
a4e77c2c-9104-11de-800e-
5b313e0d2bf3
(no author) [Mon, 24 Aug 2009 23:20:00 +0000 (23:20 +0000)]
Initial directory structure.
git-svn-id: http://ots.googlecode.com/svn/trunk@1
a4e77c2c-9104-11de-800e-
5b313e0d2bf3