mirror of
https://pdfium.googlesource.com/pdfium
synced 2026-07-31 00:58:52 +08:00
Demonstrate what happens with FPDFText_GetLooseCharBox() when a /FontDescriptor has bad ascent (and descent) values. When https://pdfium-review.googlesource.com/c/144110 switched back to using ascent/descent values for FPDFText_GetLooseCharBox(), bad ascent/descent values cause the API to return extremely large character boxes. Bug: 502757960 Change-Id: I149dbabcb1b1417d4c2c86bd0689c92482352186 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/146390 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
89 lines
1.2 KiB
Plaintext
89 lines
1.2 KiB
Plaintext
{{header}}
|
|
{{object 1 0}} <<
|
|
/Type /Catalog
|
|
/Pages 2 0 R
|
|
>>
|
|
endobj
|
|
{{object 2 0}} <<
|
|
/Type /Pages
|
|
/MediaBox [0 0 200 200]
|
|
/Count 1
|
|
/Kids [3 0 R]
|
|
>>
|
|
endobj
|
|
{{object 3 0}} <<
|
|
/Type /Page
|
|
/Parent 2 0 R
|
|
/Resources <<
|
|
/Font <<
|
|
/F1 5 0 R
|
|
/F2 7 0 R
|
|
>>
|
|
>>
|
|
/Contents 4 0 R
|
|
>>
|
|
endobj
|
|
{{object 4 0}} <<
|
|
{{streamlen}}
|
|
>>
|
|
stream
|
|
BT
|
|
0 30 Td
|
|
/F1 12 Tf
|
|
(1) Tj
|
|
/F2 12 Tf
|
|
(X) Tj
|
|
ET
|
|
endstream
|
|
endobj
|
|
{{object 5 0}} <<
|
|
/Type /Font
|
|
/Subtype /Type1
|
|
/BaseFont /Helvetica
|
|
/FontDescriptor 6 0 R
|
|
>>
|
|
endobj
|
|
{{object 6 0}} <<
|
|
/Type /FontDescriptor
|
|
/Ascent 60000000
|
|
/CapHeight 763
|
|
/Descent -223
|
|
/Flags 0
|
|
/FontBBox [-250 -236 2827 1000]
|
|
/FontName /Helvetica
|
|
/FontWeight 400
|
|
/ItalicAngle 0
|
|
/StemV 80
|
|
>>
|
|
endobj
|
|
{{object 7 0}} <<
|
|
/Type /Font
|
|
/Subtype /TrueType
|
|
/BaseFont /TimesNewRomanPSMT
|
|
/Encoding /WinAnsiEncoding
|
|
/FirstChar 31
|
|
/FontDescriptor 8 0 R
|
|
/LastChar 252
|
|
>>
|
|
endobj
|
|
{{object 8 0}} <<
|
|
/Type /FontDescriptor
|
|
/Ascent 891
|
|
/CapHeight 656
|
|
/Descent -50000000
|
|
/Flags 34
|
|
/FontBBox [-568 -307 2000 1007]
|
|
/FontFamily (Times New Roman)
|
|
/FontName /TimesNewRomanPSMT
|
|
/FontWeight 400
|
|
/ItalicAngle 0
|
|
/MissingWidth 778
|
|
/StemV 82
|
|
/XHeight -546
|
|
>>
|
|
endobj
|
|
{{xref}}
|
|
{{trailer}}
|
|
{{startxref}}
|
|
%%EOF
|