mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 18:52:45 +00:00 
			
		
		
		
	 83128d093e
			
		
	
	
		83128d093e
		
	
	
	
	
		
			
			Non-CID-keyed fonts in PDFs have 8-bit codepoints which are mapped from bytes to character names via encoding. TrueType fonts don't index glyphs by name (Type1 fonts do), so the fix (codified in the spec) was to make a list of all possible glyph names and map those to (16-bit) unicode values, and then pass those into the truetype cmap. (As a fallback, we're supposed to look at the optional names in the font's "post" table. That part isn't implemented here yet.) (Note that this affects the behavior of fallback fonts for TrueType fonts, but not yet fallback fonts for Type1 fonts, and neither the behavior of the 14 built-in Type1 fonts (which we implement as fallback fonts), since the TrueType fallback in Type1Font.cpp does not use this algorithm yet. This will be fixed in a future patch.)
		
			
				
	
	
		
			32 lines
		
	
	
	
		
			735 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
	
		
			735 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
| set(SOURCES
 | |
|     ColorSpace.cpp
 | |
|     CommonNames.cpp
 | |
|     Document.cpp
 | |
|     DocumentParser.cpp
 | |
|     Encoding.cpp
 | |
|     Encryption.cpp
 | |
|     Filter.cpp
 | |
|     Fonts/AdobeGlyphList.cpp
 | |
|     Fonts/CFF.cpp
 | |
|     Fonts/PDFFont.cpp
 | |
|     Fonts/PS1FontProgram.cpp
 | |
|     Fonts/SimpleFont.cpp
 | |
|     Fonts/TrueTypeFont.cpp
 | |
|     Fonts/Type0Font.cpp
 | |
|     Fonts/Type1Font.cpp
 | |
|     Fonts/Type1FontProgram.cpp
 | |
|     Fonts/Type3Font.cpp
 | |
|     Function.cpp
 | |
|     Interpolation.cpp
 | |
|     ObjectDerivatives.cpp
 | |
|     Page.cpp
 | |
|     Parser.cpp
 | |
|     Reader.cpp
 | |
|     Renderer.cpp
 | |
|     Value.cpp
 | |
|     )
 | |
| 
 | |
| serenity_lib(LibPDF pdf)
 | |
| target_link_libraries(LibPDF PRIVATE LibCompress LibCore LibIPC LibGfx LibTextCodec LibCrypto)
 | |
| 
 | |
| include(${SerenityOS_SOURCE_DIR}/Meta/CMake/download_icc_profiles.cmake)
 |