mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 23:42:13 +00:00
LibPDF: Add char_code -> name mapping function
We already keep both mappings internally, now it's time to actually use it.
This commit is contained in:
parent
82bd854d6f
commit
64bbe431b5
2 changed files with 10 additions and 0 deletions
|
@ -168,4 +168,12 @@ u16 Encoding::get_char_code(DeprecatedString const& name) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
DeprecatedFlyString Encoding::get_name(u8 char_code) const
|
||||
{
|
||||
auto name_iterator = m_descriptors.find(char_code);
|
||||
if (name_iterator != m_descriptors.end())
|
||||
return name_iterator->value;
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue