forked from googlefonts/sfntly
-
Notifications
You must be signed in to change notification settings - Fork 0
Update from googlefonts/sfntly #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As noted by @mujjingun in issue 63 -- at least, the report looks correct to me: fixes #63.
Fix incorrect test reported in glyph_table.cc
sfntly/c++ defines several confusing typedefs for standard types. I used sed to change them back to the standard types. This will make it easer for someone new to this codebase (i.e. everbody) to hack on it. Also, the CMakeLists.txt file assumes you use either GCC or MSVC. I use Clang, so I modified it to give Clang the same options as GCC. Also, the unit tests assume that googletest is located in `cpp/ext/gtest`. I added this to a .gitignore file so that I can symlink to `..../googletest/googletest`.
Sfntly C++ Cleanup
UnicodeString and U_* are used without including any ICU headers. This used to work with ICU 58.x, but not any more with ICU 59-to-be. This change is necessary for upgrading Chrome's ICU to 59.x. ( https://crbug.com/699469 ) Will fix #72
Fix a couple more crashes found by sfntly_fuzzer
The fix for NULL pointer derefs in sfntly::Font::Builder is too aggressive. Unfixes https://crbug.com/663737 Fixes https://crbug.com/705357
This time, only check a readable hmtx table. Fixes https://crbug.com/663737
Commit 1fba3b3 caused large ULONG values to be reinterpreted as signed 32-bit integers.
Fix a variety of sfntly bugs
Also mark a bunch of methods as const. Fixes https://crbug.com/711068
Add more bounds checks
- Simplify iterator usage. - Use std::numeric_limits in a couple places. - Remove unused FontFactory::SetSerializationTableOrdering(). - Mark more variables/methods as const. No behavior changes.
Cleanup random bits of code.
This prevents a potential infinite loop. Fixes https://crbug.com/712021
Some of them do not properly check bounds when accessing the contour_index_ array.
Those that access contour_index_ should be within bounds.
Check read value in CompositeGlyph::Initialize()
The conversion from HTML to MarkDown has been done mainly by Pandoc, with some manual cleanup afterwards. Fixes #83.
For negative values the >> operator led to an endless loop. Using the math provided by the Java standard library is safer.
Validate EBLC table's numSizes field.
When sfntly depends on ICU4C a shared library, the shared library may not provide stable C++ ABI. Use ICU C API instead.
UChar is not always char16_t in some platforms. In some cases, it's wchar_t or uint16_t. Use std::basic_string<UChar> to avoid std::u16string.
In findMatch() stop searching back for a match if we've exceeded the maximum distance that can be encoded.
[eot conversion] Fix eot conversion failure.
Fix an uninitialized value
This will revert to earlier behavior of HasName, by including a space when appending "Regular" to a base font name to synthesize a possible full name. (The space appears to have been inadvertently dropped during the migration to UCharString.)
Restore space before "Regular" font name suffix
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.