mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:17:35 +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
2 changed files with 3 additions and 3 deletions
|
@ -106,7 +106,7 @@ public:
|
||||||
|
|
||||||
if (symbol_string == "'")
|
if (symbol_string == "'")
|
||||||
return OperatorType::TextNextLineShowString;
|
return OperatorType::TextNextLineShowString;
|
||||||
if (symbol_string == "''")
|
if (symbol_string == "\"")
|
||||||
return OperatorType::TextNextLineShowStringSetSpacing;
|
return OperatorType::TextNextLineShowStringSetSpacing;
|
||||||
|
|
||||||
dbgln("unsupported graphics symbol {}", symbol_string);
|
dbgln("unsupported graphics symbol {}", symbol_string);
|
||||||
|
@ -140,7 +140,7 @@ public:
|
||||||
if (operator_type == OperatorType::TextNextLineShowString)
|
if (operator_type == OperatorType::TextNextLineShowString)
|
||||||
return "'";
|
return "'";
|
||||||
if (operator_type == OperatorType::TextNextLineShowStringSetSpacing)
|
if (operator_type == OperatorType::TextNextLineShowStringSetSpacing)
|
||||||
return "''";
|
return "\"";
|
||||||
|
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
|
@ -526,7 +526,7 @@ PDFErrorOr<Vector<Operator>> Parser::parse_operators()
|
||||||
Vector<Value> operator_args;
|
Vector<Value> operator_args;
|
||||||
|
|
||||||
constexpr static auto is_operator_char = [](char ch) {
|
constexpr static auto is_operator_char = [](char ch) {
|
||||||
return isalpha(ch) || ch == '*' || ch == '\'';
|
return isalpha(ch) || ch == '*' || ch == '\'' || ch == '"';
|
||||||
};
|
};
|
||||||
|
|
||||||
m_reader.consume_whitespace();
|
m_reader.consume_whitespace();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue