ladybird/Userland/Libraries/LibPDF/Fonts
Nico Weber 21917e7b1e LibPDF+PDFViewer+MacPDF: Don't draw hidden text by default
Text can be rendered in various ways in PDFs: Filled, stroked,
both filled and stroked, set as clipping path, hidden, or
some combinations thereof.

We don't implement any of this at the moment except "filled".

Hidden text is used in scanned documents: The image of the scan is
drawn in the background, and then OCRd text is "drawn" as hidden
on top of the scanned bitmap. That way, the (hidden) text can be
selected and copied, and it looks like you're selecting text from
the scanned bitmap. Find-in-page also works similarly. (We currently
have neither text selection nor find-in-page, but one day we will.)

Now that we have pretty good support for CCITT and are growing some
support for JBIG2, we now draw both the scanned background image
as well as the foreground text. They're not always perfectly aligned.

This change makes it so that we don't render text that's marked as
hidden. (We still do most of the coordinate math, which will probably
come in handy at some point when we implement text selection.)

This makes these scanned documents appear as they're supposed to
appear (at least in documents where we manage to decode the background
bitmap).

This also adds a debug option to force rendering of hidden text.
2024-03-16 13:10:48 -04:00
..
AdobeGlyphList.cpp LibPDF: Implement ZapfDingbats clause of the adobe glphy list algorithm 2024-03-01 14:17:42 +01:00
AdobeGlyphList.h LibPDF: Implement ZapfDingbats clause of the adobe glphy list algorithm 2024-03-01 14:17:42 +01:00
CFF.cpp LibPDF: Give CFF Glyph 0 the name .notdef 2024-02-20 06:54:50 -05:00
CFF.h Userland+Tests: Remove unused <AK/Tuple.h> includes 2024-03-01 14:05:53 -07:00
PDFFont.cpp LibPDF: Make PDFFont::replacement_for() return a ScaledFont 2024-03-01 17:56:59 +01:00
PDFFont.h LibPDF: Make truetype fonts marked as symbol fonts actually work 2024-03-07 11:29:47 -05:00
PS1FontProgram.cpp Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
PS1FontProgram.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
SimpleFont.cpp LibPDF+PDFViewer+MacPDF: Don't draw hidden text by default 2024-03-16 13:10:48 -04:00
SimpleFont.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
TrueTypeFont.cpp LibPDF: Make truetype fonts marked as symbol fonts actually work 2024-03-07 11:29:47 -05:00
TrueTypeFont.h LibPDF: Give TrueTypePainter a ScaledFont instead of a Font 2024-03-01 17:56:59 +01:00
Type0Font.cpp LibPDF+PDFViewer+MacPDF: Don't draw hidden text by default 2024-03-16 13:10:48 -04:00
Type0Font.h LibPDF: Honor writing mode in TJ operator as well 2024-03-02 12:25:09 +01:00
Type1Font.cpp LibPDF: Make truetype fonts marked as symbol fonts actually work 2024-03-07 11:29:47 -05:00
Type1Font.h LibPDF: Let Type1Font use TrueTypePainter for standard fonts 2024-02-27 07:02:27 +01:00
Type1FontProgram.cpp LibPDF: Don't crash on zero-width characters in type1 fonts 2024-02-27 07:01:05 +01:00
Type1FontProgram.h LibPDF/CFF: Store if a font program is CID-keyed 2024-02-15 12:32:31 +01:00
Type3Font.cpp LibPDF: Add an initial implementation of type 3 glyph rendering 2023-11-17 19:47:53 +00:00
Type3Font.h LibPDF: Pass Renderer to SimpleFont::draw_glyph() 2023-11-17 19:47:53 +00:00