mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:27:43 +00:00
LibPDF: Move font files into their own directory
This commit is contained in:
parent
d2771eafc5
commit
5f9d35909d
8 changed files with 55 additions and 26 deletions
24
Userland/Libraries/LibPDF/Fonts/PDFFont.cpp
Normal file
24
Userland/Libraries/LibPDF/Fonts/PDFFont.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Matthew Olsson <mattco@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibPDF/CommonNames.h>
|
||||
#include <LibPDF/Fonts/PDFFont.h>
|
||||
#include <LibPDF/Fonts/Type1Font.h>
|
||||
|
||||
namespace PDF {
|
||||
|
||||
PDFErrorOr<NonnullRefPtr<PDFFont>> PDFFont::create(Document* document, NonnullRefPtr<DictObject> dict)
|
||||
{
|
||||
auto subtype = TRY(dict->get_name(document, CommonNames::Subtype))->name();
|
||||
|
||||
if (subtype == "Type1")
|
||||
return TRY(Type1Font::create(document, dict));
|
||||
|
||||
dbgln("Unknown font subtype: {}", subtype);
|
||||
TODO();
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue