mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2025-08-29 15:22:06 +02:00
Merge TTF changes to fix off-by-one error.
This commit is contained in:
9
ttf.c
9
ttf.c
@@ -3,16 +3,12 @@
|
||||
//
|
||||
// https://github.com/michaelrsweet/ttf
|
||||
//
|
||||
// Copyright © 2018-2021 by Michael R Sweet.
|
||||
// Copyright © 2018-2023 by Michael R Sweet.
|
||||
//
|
||||
// Licensed under Apache License v2.0. See the file "LICENSE" for more
|
||||
// information.
|
||||
//
|
||||
|
||||
//
|
||||
// Include necessary headers...
|
||||
//
|
||||
|
||||
#ifdef _WIN32
|
||||
# define _CRT_SECURE_NO_WARNINGS
|
||||
#endif // _WIN32
|
||||
@@ -691,6 +687,9 @@ ttfGetExtents(
|
||||
ch = *s++;
|
||||
}
|
||||
|
||||
// Issue #1: Offset past ".notdef"...
|
||||
ch ++;
|
||||
|
||||
// Find its width...
|
||||
if ((widths = font->widths[ch / 256]) != NULL)
|
||||
{
|
||||
|
Reference in New Issue
Block a user