1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00
serenity/Userland/Libraries
Nico Weber f34da6396f LibPDF: Update font size after getting font from cache
Page 1 of 0000277.pdf does:

    BT 22 0 0 22  59  28 Tm /TT2 1 Tf
        (Presented at Photonics West OPTO, February 17, 2016) Tj ET
    BT 32 0 0 32 269 426 Tm /TT1 1 Tf
        (Robert W. Boyd) Tj ET
    BT 22 0 0 22 253 357 Tm /TT2 1 Tf
        (Department of Physics and) Tj ET
    BT 22 0 0 22 105 326 Tm /TT2 1 Tf
        (Max-Planck Centre for Extreme and Quantum Photonics) Tj ET

Every line begins a text operation, then updates the font matrix,
selects a font (TT2, TT1, TT2, TT1), draws some text and ends the text
operation.

`Tm` (which sets the font matrix) contains a scale, and uses that
to update the font size of the currently-active font (cf #20084).
But in this file, we `Tm` first and `Tf` (font selection) second,
so this updates the size of the old font. So when we pull it out
of the cache again on line 3, it would still have the old size
from the `Tm` on line 2.

(The whole text scaling logic in LibPDF imho needs a rethink; the
current approach also causes issues with zero-width glyphs which
currently lead to divisions by zero. But that's for another PR.)

Fixes another regression from c8510b58a3 (which I've accidentally
referred to by 2340e834cd in another commit).
2023-11-26 19:05:13 -05:00
..
LibAccelGfx LibAccelGfx+LibWeb: Discard painting of commands outside of viewport 2023-11-26 21:26:26 +01:00
LibArchive AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
LibAudio LibAudio: Speed up WavWriter by buffering output data 2023-11-23 18:05:22 -05:00
LibC Userland+Tests: Add initial riscv64 support 2023-11-10 10:30:08 -07:00
LibCards LibCards/CardPainter: Add a helper for accessing the caches 2023-11-24 11:45:32 +00:00
LibChess AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
LibCMake LibSyntax+Userland: Make LibSyntax not depend on LibGUI 2023-08-29 07:57:39 -04:00
LibCodeComprehension AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
LibCompress LibCompress/LZW: Use its own debug flag 2023-11-12 13:56:27 +01:00
LibConfig Userland: Convert config listener callbacks to use StringView 2023-06-27 15:37:00 +01:00
LibCore AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
LibCoredump Userland+Tests: Add initial riscv64 support 2023-11-10 10:30:08 -07:00
LibCpp AK+Everywhere: Remove the null state of DeprecatedString 2023-10-13 18:33:21 +03:30
LibCrypt Everywhere: Resolve conflicts with LibC and libc++ 2023-06-27 12:40:38 +02:00
LibCrypto LibCrypto: Add SECP384r1 implementation 2023-11-11 14:40:10 +03:30
LibDebug Userland+Tests: Add initial riscv64 support 2023-11-10 10:30:08 -07:00
LibDesktop AppFile: Add helpers for dealing with AppFile paths 2023-11-09 23:35:52 +01:00
LibDeviceTree Everywhere: Remove unused DeprecatedString includes 2023-04-09 22:00:54 +02:00
LibDiff LibDiff: Fix wrong index used when prepending context lines 2023-09-11 12:10:50 +01:00
LibDNS LibDNS: Ensure DNS name and label sizes are within expected limits 2023-11-14 10:12:44 +01:00
LibDSP Userland: Prefer _string over _short_string 2023-08-08 07:37:21 +02:00
LibEDID LibC+Kernel: Move GPU-related API methods to a LibC header file 2023-09-15 11:05:25 -06:00
LibELF Userland+Tests: Add initial riscv64 support 2023-11-10 10:30:08 -07:00
LibFileSystem LibFileSystem: Replace PATH_MAX usage with heap allocation 2023-09-06 07:14:35 -06:00
LibFileSystemAccessClient AK+Everywhere: Remove the null state of DeprecatedString 2023-10-13 18:33:21 +03:30
LibGemini AK+Everywhere: Remove the null state of DeprecatedString 2023-10-13 18:33:21 +03:30
LibGfx LibGfx+LibWeb: Add ImmutableBitmap for images bitmap caching in painter 2023-11-26 12:55:43 +01:00
LibGL LibGL: Optimize appends in gl_vertex 2023-10-15 12:14:07 +02:00
LibGLSL LibGLSL: Add tests for GLSL parser 2023-08-18 15:29:48 +02:00
LibGPU LibGL+Lib*GPU: Set model view and projection matrices separately 2023-10-15 12:14:07 +02:00
LibGUI Taskbar+WindowServer: Adding to Quick Launch via windows :^) 2023-11-09 23:35:52 +01:00
LibHTTP LibHTTP: Fix issues with HTTP POST request and requests with a body 2023-10-31 07:09:26 +01:00
LibIDL AK+LibIDL: Put IDL dbgln statement behind a debug flag 2023-11-15 23:42:53 +01:00
LibImageDecoderClient Ladybird: Decode images out of process 2023-10-27 07:26:32 +02:00
LibIMAP LibIMAP: Make parsing of atom data fallible 2023-11-08 09:36:37 +01:00
LibIPC Userland: Rename Core::Object to Core::EventReceiver 2023-08-06 20:39:51 +02:00
LibJIT LibJS/JIT: Add a builtin for Math.abs 2023-11-17 19:06:25 +01:00
LibJS LibJS/JIT: Add fast path for JumpConditional where accumulator is Int32 2023-11-26 19:32:51 +01:00
LibKeyboard Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
LibLine LibLine: Reset state after invalid character in DSR response 2023-11-18 18:33:00 +03:30
LibLocale LibLocale: Remove compact currency patterns 2023-09-04 18:22:28 +02:00
LibMain
LibManual AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
LibMarkdown LibMarkdown: Render slugified anchor tag in heading 2023-10-30 10:39:59 +00:00
LibPartition Everywhere: Remove needless trailing semi-colons after functions 2023-07-08 10:32:56 +01:00
LibPCIDB LibCore: Make MappedFile OwnPtr-based 2023-09-27 03:22:56 +02:00
LibPDF LibPDF: Update font size after getting font from cache 2023-11-26 19:05:13 -05:00
LibProtocol Ladybird: Add WebSocket server for use by Lagom networking 2023-08-03 09:55:20 +02:00
LibRegex LibRegex: Support non-ASCII case-insensitive character comparisons 2023-11-08 12:54:26 -05:00
LibSanitizer LibSanitizer: Add _abort variants of UBSan handlers 2023-08-13 05:14:07 +02:00
LibSoftGPU LibSoftGPU: Optimize GPU::Vertex lists 2023-10-15 12:14:07 +02:00
LibSQL AK+Everywhere: Remove the null state of DeprecatedString 2023-10-13 18:33:21 +03:30
LibSymbolication LibCore: Make MappedFile OwnPtr-based 2023-09-27 03:22:56 +02:00
LibSyntax AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
LibSystem Everywhere: Resolve conflicts with LibC and libc++ 2023-06-27 12:40:38 +02:00
LibTest LibTest: Fix integer overflow in Gen::unsigned_int(u32) 2023-11-18 10:01:29 +01:00
LibTextCodec LibTextCodec: Add PDFDocEncoding decoder 2023-11-22 09:08:06 -07:00
LibThreading LibThreading: Make Thread keep itself alive while its action is running 2023-08-07 10:40:34 -06:00
LibTimeZone LibTimeZone: Handle systems with varying zoneinfo file locations 2023-11-17 19:07:53 +01:00
LibTLS LibTLS: Add support for SECP384r1 2023-11-11 14:40:10 +03:30
LibUnicode LibUnicode: Define case-insensitive string comparison more generically 2023-11-08 12:54:26 -05:00
LibUSBDB LibCore: Make MappedFile OwnPtr-based 2023-09-27 03:22:56 +02:00
LibVideo AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
LibVirtGPU LibGL+Lib*GPU: Set model view and projection matrices separately 2023-10-15 12:14:07 +02:00
LibVT Kernel+Userland: Replace the beep syscall with the new /dev/beep device 2023-11-03 15:19:33 +01:00
LibWasm AK: Rename GenericTraits to DefaultTraits 2023-11-09 10:05:51 -05:00
LibWeb LibAccelGfx+LibWeb: Discard painting of commands outside of viewport 2023-11-26 21:26:26 +01:00
LibWebSocket LibWebSocket: Adds capability for receiving fragmented messages 2023-09-09 10:59:59 -06:00
LibWebView LibWebView: Scroll inspected elements into view with a slight offset 2023-11-24 17:19:08 -05:00
LibX86 LibX86: Support decoding F2 SSE instructions 2023-11-10 11:01:59 +01:00
LibXML LibXML: Set parents for text and comment nodes 2023-08-18 08:58:51 +03:30
CMakeLists.txt LibAccelGfx+Meta: Introduce OpenGL painting library 2023-10-29 17:13:23 +01:00