lilee / sfntly Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/sfntly
Automatically exported from code.google.com/p/sfntly
What steps will reproduce the problem?
1. Call the function for a font that has glyphs with no data
(LocaTable.glyphLength()==0
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
The attached patch fixes the issue by ignoring such glyphs during computation.
Original issue reported on code.google.com by [email protected]
on 2 Sep 2013 at 3:57
Attachments:
There are external table builders in the subsetter code that need to be
integrated into the code for the table they are building. Examples of these are
HorizontalMetricsTableBuilder and PostScriptTableBuilder. Having these as
external makes them more difficult to use and to keep up to date with core code
changes.
Original issue reported on code.google.com by [email protected]
on 10 Jan 2012 at 1:26
Removing unused member variables that clang's new -Wunused-private-field
complains about.
Original issue reported on code.google.com by [email protected]
on 29 Jun 2012 at 5:05
Need to add a standard Eclipse project settings to the repository.
Original issue reported on code.google.com by [email protected]
on 3 Dec 2011 at 12:00
The renumbering subsetter only reads format 4 cmaps. This is a limitation in
computeMapping in the RenumberingCMapTableSubsetter.
Currently there is only a builder for format 4 cmaps, so I'd expect sfntly to
support all 16-bit cmaps and just write them out as format 4, yet it doesn't.
It should also honour the Subsetter's cmapId() list.
For 32-bit cmaps a format 12 builder is needed.
Original issue reported on code.google.com by [email protected]
on 7 Oct 2013 at 9:17
Replace the hardcoded version of the ICU library in the ant build and the
Eclipse project with a symlink.
Original issue reported on code.google.com by [email protected]
on 9 Dec 2011 at 12:49
Remove the Font.Builder.newTableBuilder() factory methods. Ensure that every
concrete Table.Builder subclass has appropriate Factory methods.
This will clean up the code and remove unnecessary generic-ness and unsafe
conversions.
Original issue reported on code.google.com by [email protected]
on 25 Jan 2012 at 2:19
There are some inline methods in nested classes. These break when sfntly is
compiled with gcc using -fPIC (for creation of a shared library). The methods
return incorrect results, which can lead to generation of corrupted
fonts/segfaults/etc.
Here is a patch that fixes this for the loca table (there may be other places
that exhibit this issue, but this is the only one that impacted me, so far).
http://bazaar.launchpad.net/~kovid/calibre/trunk/revision/13579
Original issue reported on code.google.com by [email protected]
on 30 Oct 2012 at 6:10
c:\sfntly-r151\java>ant -f javadoc.xml
...
[javadoc] Loading source files for package com.google.typography.font.sfntly.t
able.core...
[javadoc] c:\sfntly-r151\java\src\com\goog
le\typography\font\sfntly\table\truetype\LocaTable.java:107: unmappable characte
r for encoding Cp1252
[javadoc] * @return the loca table value├?
[javadoc] ^
[javadoc] c:\sfntly-r151\java\src\com\goog
le\typography\font\sfntly\table\truetype\LocaTable.java:389: unmappable characte
r for encoding Cp1252
[javadoc] * @return the loca table value├?
...
[javadoc] 2 errors
...
java/build/javadoc folder is left empty.
LocaTable.java (obtained by exporting r151 with svn) has indeed stray
characters at the end of lines 107 and 389 that prevents javadoc from running.
These characters are also shown in Web source browsing as I acute.
Removing those two characters lets javadoc run to completion.
Original issue reported on code.google.com by [email protected]
on 21 Mar 2013 at 1:23
What steps will reproduce the problem?
1. Open corrupt font (for example, in SFD format) with stream-based method such
as loadFonts(InputStream).
What is the expected output? What do you see instead?
Expected result: exception of some sort indicating corrupt font
Actual result:
java.lang.OutOfMemoryError: Java heap space
at com.google.typography.font.sfntly.data.MemoryByteArray.<init>(MemoryByteArray.java:37)
at com.google.typography.font.sfntly.data.WritableFontData.createWritableFontData(WritableFontData.java:43)
at com.google.typography.font.sfntly.Font$Builder.loadTableData(Font.java:951)
at com.google.typography.font.sfntly.Font$Builder.loadFont(Font.java:629)
at com.google.typography.font.sfntly.Font$Builder.getOTFBuilder(Font.java:648)
at com.google.typography.font.sfntly.FontFactory.loadSingleOTFForBuilding(FontFactory.java:181)
at com.google.typography.font.sfntly.FontFactory.loadSingleOTF(FontFactory.java:158)
at com.google.typography.font.sfntly.FontFactory.loadFonts(FontFactory.java:133)
Please use labels and text to provide additional information.
Original issue reported on code.google.com by [email protected]
on 9 Feb 2012 at 7:41
Attachments:
Sample code:
FontFactoryPtr factory = FontFactory::getInstance();
FontBuilderArray font_builder_array;
FileInputStream is;
is.open("arial.ttf");
factory->loadFontsForBuilding(&is, builders);
FontBuilderPtr font_builder = font_builder_array[0];
FontPtr font = font_builder->build();
MemoryOutputStream output_stream;
factory->serializeFont(font, &output_stream);
Expected result:
output_stream shall have same size as input file.
Actual result:
output_stream is corrupted.
Original issue reported on code.google.com by [email protected]
on 7 Jul 2011 at 10:48
Existing nested class structure on a number of the table classes needs to be
expanded out into a flatter structure. Examples of such classes are CMapTable
and GlyphTable.
This is a holdover from an earlier design.
Original issue reported on code.google.com by [email protected]
on 9 Dec 2011 at 7:57
What steps will reproduce the problem?
1. Using SfntTool to subset font bl-norm.ttf
2. Get exception
Hi,
I was testing out using the sfnttool to subset a font, and I came across this
error:
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index attempted
to be read from is out of bounds: 100f5
at com.google.typography.font.sfntly.data.ReadableFontData.readUByte(Unknown Source)
at com.google.typography.font.sfntly.data.ReadableFontData.readUShort(Unknown Source)
at com.google.typography.font.sfntly.table.core.CMapFormat4.retrieveGlyphId(Unknown Source)
at com.google.typography.font.sfntly.table.core.CMapFormat4.glyphId(Unknown Source)
at com.google.typography.font.tools.subsetter.RenumberingCMapTableSubsetter.computeMapping(Unknown Source)
at com.google.typography.font.tools.subsetter.RenumberingCMapTableSubsetter.subset(Unknown Source)
at com.google.typography.font.tools.subsetter.Subsetter.subset(Unknown Source)
at com.google.typography.font.tools.sfnttool.SfntTool.subsetFontFile(Unknown Source)
at com.google.typography.font.tools.sfnttool.SfntTool.main(Unknown Source)
I was wondering what could be causing this error? I have attached the font
involved.
Original issue reported on code.google.com by [email protected]
on 27 Aug 2012 at 5:43
Attachments:
Hi,
I'm a member of project https://code.google.com/p/xdocreport/.
This is a set of java libs that enable templating in docx/ odt and allows to
export to PDF the merged content.
We deploy our jars to central maven repo :
http://search.maven.org/#search%7Cga%7C1%7Cxdocreport.
We want to make a "Google App Engine" extension of our libs and we need a
dependency on your lib (sfntly-java).
Unfortunatly, sfntly-jaa cannot be found on central maven repo.
If you are interested I worked on a fork of the project
https://github.com/pascalleclercq/sfntly-java
in order to "mavenize" It : I may commit my work on your repo.
best regards
Original issue reported on code.google.com by pascal.leclercq
on 18 Mar 2013 at 1:48
clang warns:
third_party/sfntly/src/sfntly/table/subtable_container_table.h:48:79: warning:
no newline at end of file [-pedantic,-Wnewline-eof]
#endif // TYPOGRAPHY_FONT_SFNTLY_SRC_SFNTLY_TABLE_SUBTABLE_CONTAINER_TABLE_H_
^
You should set chromium_code in sfntly's gyp file to enable warnings-as-errors
for sfntly. It looks mostly clean, and that will make sure you don't regress.
Original issue reported on code.google.com by [email protected]
on 13 Oct 2011 at 9:51
What steps will reproduce the problem?
1. Add a name to the fonts name table that will sort at the end of the list.
2. Save the font.
What is the expected output? What do you see instead?
Font should save but instead an Index Out of Bounds exception is thrown.
Code snippet:
FontFactory fontFactory = FontFactory.getInstance();
File fontFile = TestFont.TestFontNames.OPENSANS.getFile();
Font.Builder fontBuilder = fontFactory.loadFontsForBuilding(new FileInputStream(fontFile))[0];
NameTable.Builder nameTableBuilder = (NameTable.Builder) fontBuilder.getTableBuilder(Tag.name);
nameTableBuilder.nameBuilder(Font.PlatformId.Windows.value(),
Font.WindowsEncodingId.UnicodeUCS4.value(),
NameTable.WindowsLanguageId.Spanish_UnitedStates.value(),
NameTable.NameId.WWSSubfamilyName.value()).setName("");
Font font = fontBuilder.build(); // exception occurs here.
Original issue reported on code.google.com by [email protected]
on 15 Jan 2013 at 11:26
What steps will reproduce the problem?
1. Reading the source code of the method OS2Table.setUsWinDescent(). The error
is obvious (probably a copy/paste error)
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
The attached patch fixes the problem.
Original issue reported on code.google.com by [email protected]
on 2 Sep 2013 at 3:48
Attachments:
What steps will reproduce the problem?
Using FontHeaderTable methods xMin(), xMax(), yMin(), and yMax().
What is the expected output? What do you see instead?
The aforementioned methods should extract values from the font as signed
shorts, but extract the values as unsigned shorts instead.
Original issue reported on code.google.com by [email protected]
on 7 Aug 2012 at 1:27
Reorganize the non-library code (tools, sample, etc.) to sit outside of the
hierarchy of the library source code. So, have java/src, java/sample,
java/tools, etc. This will simplify the build system and make it easier to keep
the various pieces from interacting in unintended ways.
Original issue reported on code.google.com by [email protected]
on 24 Jan 2012 at 9:19
OTS santizer rejected fonts serialized by C++ library because wrong order of
font tables. And because of wrong ordered cmap tables.
This font could not be loaded in web browser (except IE) after I changed
comparator classes it started to work.
Jan Hruby
Original issue reported on code.google.com by [email protected]
on 28 Jan 2013 at 6:44
All of the tool jars can't be run using java -jar blah.jar.
Original issue reported on code.google.com by [email protected]
on 7 Feb 2012 at 9:10
Consider approaches for better validation of the sfnt container on loading that
won't impact performance nor exclude legal sfnt containers.
Original issue reported on code.google.com by [email protected]
on 13 Feb 2012 at 11:33
As per http://bugs.sun.com/view_bug.do?bug_id=7007868
An exception for the formatter that was not previously thrown now is (in Java
7), which breaks the FontInfo tool.
Proposed fix is attached
Original issue reported on code.google.com by [email protected]
on 10 Jul 2013 at 3:48
Attachments:
What steps will reproduce the problem?
1. Load any font for building
2. Build it
3. Observe the checksum adjustment value in the 'head' table
What is the expected output? What do you see instead?
A valid checksum adjustment is expected - an invalid one is seen instead,
verifiable through using Microsoft's font validator.
What version of the product are you using? On what operating system?
r147, Java version on Windows XP
Please provide any additional information below.
I think the issue is that when the font checksum is calculated in
buildTablesFromBuilders, it does not include checksumming the offset table.
From http://support.microsoft.com/kb/102354, the whole file including the
offset table (except for the checksum adjustment field) has to be included in
the checksum, which is not done in sfntly (the offset table is only produced on
serialization)
Original issue reported on code.google.com by [email protected]
on 26 Oct 2012 at 6:22
Compiling with JDK7 results in errors.
$ ant
Buildfile: build.xml
compile:
[mkdir] Created dir: /home/xxx/src/sfntly/java/build/classes
[javac] Compiling 104 source files to /home/xxx/src/sfntly/java/build/classes
[javac] /home/xxx/src/sfntly/java/src/com/google/typography/font/sfntly/table/Table.java:169: error: header has private access in Table
[javac] table.header = header;
[javac] ^
[javac] 1 error
Original issue reported on code.google.com by [email protected]
on 6 Nov 2012 at 9:31
Using font from http://img.dafont.com/dl/?f=escapeviawindow and passing it
through the java sfnttool tool, it fails when trying to make an eot file
reedy@ubuntu64-web-esxi:/var/www/wiki/mediawiki/extensions/UniversalLanguageSele
ctor/data/fontrepo/fonts/EscapeViaWindow$ java -jar
/home/reedy/sfntly-builds/java-openjdk-7/sfnttool/sfnttool.jar -e -h -x
EscapeViaWindow.ttf EscapeViaWindow.eot
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index attempted
to be read from is out of bounds: 4e
at com.google.typography.font.sfntly.data.ReadableFontData.readUByte(Unknown Source)
at com.google.typography.font.sfntly.data.ReadableFontData.readULong(Unknown Source)
at com.google.typography.font.sfntly.table.core.OS2Table.ulCodePageRange1(Unknown Source)
at com.google.typography.font.tools.conversion.eot.EOTWriter.writeCodePages(Unknown Source)
at com.google.typography.font.tools.conversion.eot.EOTWriter.convert(Unknown Source)
at com.google.typography.font.tools.sfnttool.SfntTool.subsetFontFile(Unknown Source)
at com.google.typography.font.tools.sfnttool.SfntTool.main(Unknown Source)
Original issue reported on code.google.com by [email protected]
on 15 Dec 2013 at 7:07
windows-933 does not exist (no such code page as 933), but code page 932
exists, and is what should be used instead -->
http://en.wikipedia.org/wiki/Code_page_932
Original issue reported on code.google.com by [email protected]
on 29 Nov 2013 at 11:21
Attachments:
Some of the parameters passed to the builders are byte arrays that need to be
of a specific fixed length. These need to be validated.
Original issue reported on code.google.com by [email protected]
on 9 Dec 2011 at 7:50
As per the specification, the table version number is Fixed and not UShort.
http://www.microsoft.com/typography/otspec/maxp.htm
Original issue reported on code.google.com by [email protected]
on 4 Dec 2013 at 12:21
Attachments:
Compilation fails on VS2013.
Add missing includes of <algorithm> for std::min/max.
Original issue reported on code.google.com by [email protected]
on 16 Oct 2013 at 11:00
For Tuffy.ttf, run subsetter, and use Microsoft ttfdump to observe dumped file.
(Microsoft Font Tools can be downloaded from
http://www.microsoft.com/typography/tools/tools.aspx).
Expected result:
Unicode Range 1( Bits 0 - 31 ): 80000003
Unicode Range 2( Bits 32- 63 ): 00000002
Unicode Range 3( Bits 64- 95 ): 00000000
Unicode Range 4( Bits 96-127 ): 00000000
CodePage Range 1( Bits 0 - 31 ): 00000001
CodePage Range 2( Bits 32- 63 ): 80D40000
Actual result:
Unicode Range 1( Bits 0 - 31 ): 1800CD1E
Unicode Range 2( Bits 32- 63 ): 7977C949
Unicode Range 3( Bits 64- 95 ): 8043FEFF
Unicode Range 4( Bits 96-127 ): FFFF7A38
CodePage Range 1( Bits 0 - 31 ): 3F000201
CodePage Range 2( Bits 32- 63 ): 0000002F
Note: Hex editor reveals that the bytes are written correctly, therefore this
could be due to invalid byte paddings.
Java version does not have the problem.
Original issue reported on code.google.com by [email protected]
on 12 Jul 2011 at 7:55
Document the signaling through the table hierarchy during the build process and
other situations. This will be useful to those implementing table classes.
Original issue reported on code.google.com by [email protected]
on 25 Jan 2012 at 1:05
When building on QNX, the build is broken.
sfntly uses "#include <cstddef>" to get size_t, but that only puts size_t in
the std:: namespace with the strict library on QNX.
Original issue reported on code.google.com by [email protected]
on 29 Oct 2013 at 6:02
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
This is an enhancement suggestion (is there a "new enhacement" hidden somewhere
that I missed?).
The attached patch provides a class to compute the bits.
Original issue reported on code.google.com by [email protected]
on 2 Sep 2013 at 4:13
Attachments:
What steps will reproduce the problem?
1. Open a font for editing.
2. Edit a table that has multiple references to the same subtable. e.g. cmap
table that has 2 or more references to the same cmap subtable - Mac and Windows
encoding records point to same format 4 subtable
3. Serialize the font
What is the expected output? What do you see instead?
There should only be one subtable in the serialized font instead of two. Need
to have a way to separate them for editing separately but also a way to keep
them together.
This issue applies to other subtables in other tables too.
Original issue reported on code.google.com by [email protected]
on 9 Dec 2011 at 7:48
Table builders should support two versions: 1) one for reading any existing
data; 2) one for creating new data.
Can be worked around by creating new empty table and copying.
Original issue reported on code.google.com by [email protected]
on 9 Dec 2011 at 7:55
Branch name: 128
Purpose of code changes on this branch: workaround Apple font bug
Original issue reported on code.google.com by [email protected]
on 28 Feb 2012 at 3:21
What steps will reproduce the problem?
1. Open a font for editing.
2. Edit the font.
3. Serialize
What is the expected output? What do you see instead?
The checksum for the serialized font is incorrect when read.
Original issue reported on code.google.com by [email protected]
on 9 Dec 2011 at 7:41
Some fonts have name table entries where the name bytes field is empty (zero
length), and additionally has the index to the entry equal to the bounds of the
name table.
Extra bounds checking introduced with r155 causes sfntly to crash on such
entries with an IndexOutOfBounds exception. I believe that in this case, such
entries are valid (since the length is zero) and sfntly should not throw an
exception.
Original issue reported on code.google.com by [email protected]
on 10 Jul 2013 at 4:22
Attachments:
Both the make and make lines will produce errors on OS X (tested on Yosemite).
If you run `cmake ..` from within build, you get: `CMake Error: The source
directory "/Applications/sfntly" does not appear to contain CMakeLists.txt.`
sfntly Revision 239 on OS X 10.10 (14A389)
Here is what I did:
svn checkout http://sfntly.googlecode.com/svn/trunk/ /Applications/sfntly/
cd /Applications/sfntly/
mkdir build
cd build
cmake ..
Then I get the error. If I continue with …
cmake ../cpp
… but then I get this output:
-- The C compiler identification is AppleClang 6.0.0.6000054
-- The CXX compiler identification is AppleClang 6.0.0.6000054
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
CMake Error at CMakeLists.txt:84 (add_executable):
Cannot find source file:
ext/gtest/src/gtest-all.cc
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
-- Build files have been written to: /Applications/sfntly/build
Then I get this error from `make`:
make: *** No targets specified and no makefile found. Stop.
Original issue reported on code.google.com by [email protected]
on 3 Nov 2014 at 3:38
What steps will reproduce the problem?
1. Call setUsLastCharIndex(int lastIndex) with some value
What is the expected output? What do you see instead?
Expect to set usLastCharIndex. Sets usFirstCharIndex instead
What version of the product are you using? On what operating system?
r147, Java Windows
Please provide any additional information below.
The setter should use Offset.usLastCharIndex.offset and not
Offset.usFirstCharIndex.offset (in OS2Table.java)
Original issue reported on code.google.com by [email protected]
on 26 Oct 2012 at 12:46
What steps will reproduce the problem?
1. Run the attached class with either 'byte' or 'filestream' as input parameters
2. Compare the output for each case
What is the expected output? What do you see instead?
There behaviour should be consistent, independent of how the font was loaded.
What version of the product are you using? On what operating system?
r147, Windows XP
Please provide any additional information below.
When calling Glyph.xMin() for glyph id 1012 (corresponding to U+0020/SPACE for
the attached font), an IndexOutOfBounds exception will be thrown iff loaded
from a file input stream. This is not observed if loaded from a byte array.
Original issue reported on code.google.com by [email protected]
on 26 Jan 2013 at 3:12
Attachments:
UnicodeRange appears to be missing two entries:
34 Combining Diacritical Marks For Symbols
35 Letterlike Symbols
Original issue reported on code.google.com by [email protected]
on 30 Nov 2013 at 2:49
Attachments:
Pick and use a single common command line library for all the tools.
Original issue reported on code.google.com by [email protected]
on 7 Feb 2012 at 8:37
What steps will reproduce the problem?
0. svn checkout
1. cd java
2. ant
~/sfntly-read-only/java$ java -version
java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
~/sfntly-read-only/java$ ant
Buildfile: /sfntly-read-only/java/build.xml
compile:
[javac] Compiling 201 source files to /sfntly-read-only/java/build/classes
[javac] /sfntly-read-only/java/src/com/google/typography/font/sfntly/table/opentype/component/VisibleBuilder.java:8: error: Builder has protected access in SubTable
[javac] class VisibleBuilder<T extends SubTable> extends SubTable.Builder<T> {
[javac] ^
[javac] /sfntly-read-only/java/src/com/google/typography/font/sfntly/sample/sfview/RuleDump.java:26: error: method charGlyphClosure in class Rule cannot be applied to given types;
[javac] GlyphGroup ruleClosure = Rule.charGlyphClosure(txt, font);
[javac] ^
[javac] required: Font,String
[javac] found: String,Font
[javac] reason: actual argument String cannot be converted to Font by method invocation conversion
[javac] /sfntly-read-only/java/src/com/google/typography/font/sfntly/table/opentype/component/VisibleBuilder.java:20: error: method does not override or implement a method from a supertype
[javac] @Override
[javac] ^
[javac] /sfntly-read-only/java/src/com/google/typography/font/sfntly/table/opentype/component/VisibleBuilder.java:23: error: method does not override or implement a method from a supertype
[javac] @Override
[javac] ^
[javac] /sfntly-read-only/java/src/com/google/typography/font/sfntly/table/opentype/component/VisibleBuilder.java:26: error: method does not override or implement a method from a supertype
[javac] @Override
[javac] ^
[javac] /sfntly-read-only/java/src/com/google/typography/font/sfntly/table/opentype/component/VisibleBuilder.java:29: error: method does not override or implement a method from a supertype
[javac] @Override
[javac] ^
[javac] 6 errors
BUILD FAILED
/sfntly-read-only/java/common.xml:21: Compile failed; see the compiler error
output for details.
Total time: 12 seconds
Original issue reported on code.google.com by [email protected]
on 18 Jan 2014 at 8:36
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.