mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibPDF: Fix symbol for text_next_line_show_string_set_spacing operator
It's `"`, not `''`. Now the `text_next_line_show_string_set_spacing` gets called and logs a TODO at page render time if `"` is used in a PDF: warning: Rendering of feature not supported: draw operation: text_next_line_show_string_set_spacing It caused a parse error (also at page render time) previously: [parse_value @ .../LibPDF/Parser.cpp:104] Parser error at offset 611: Unexpected char """
This commit is contained in:
parent
18b86b1868
commit
77e6dbab33
Notes:
sideshowbarker
2024-07-17 06:29:49 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/77e6dbab33 Pull-request: https://github.com/SerenityOS/serenity/pull/20146
2 changed files with 3 additions and 3 deletions
|
@ -106,7 +106,7 @@ public:
|
|||
|
||||
if (symbol_string == "'")
|
||||
return OperatorType::TextNextLineShowString;
|
||||
if (symbol_string == "''")
|
||||
if (symbol_string == "\"")
|
||||
return OperatorType::TextNextLineShowStringSetSpacing;
|
||||
|
||||
dbgln("unsupported graphics symbol {}", symbol_string);
|
||||
|
@ -140,7 +140,7 @@ public:
|
|||
if (operator_type == OperatorType::TextNextLineShowString)
|
||||
return "'";
|
||||
if (operator_type == OperatorType::TextNextLineShowStringSetSpacing)
|
||||
return "''";
|
||||
return "\"";
|
||||
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
|
@ -526,7 +526,7 @@ PDFErrorOr<Vector<Operator>> Parser::parse_operators()
|
|||
Vector<Value> operator_args;
|
||||
|
||||
constexpr static auto is_operator_char = [](char ch) {
|
||||
return isalpha(ch) || ch == '*' || ch == '\'';
|
||||
return isalpha(ch) || ch == '*' || ch == '\'' || ch == '"';
|
||||
};
|
||||
|
||||
m_reader.consume_whitespace();
|
||||
|
|
Loading…
Add table
Reference in a new issue