mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-04-16 19:27:24 +02:00
Issue #72: Cannot select text
This commit is contained in:
parent
7eb2f2a465
commit
ae6c6eb76b
@ -2102,22 +2102,25 @@ PDFFontCMap PDFFontCMap::createFromData(const QByteArray& data)
|
|||||||
}
|
}
|
||||||
else if (command == "beginbfrange")
|
else if (command == "beginbfrange")
|
||||||
{
|
{
|
||||||
PDFLexicalAnalyzer::Token token1 = parser.fetch();
|
while (true)
|
||||||
|
|
||||||
if (token1.type == PDFLexicalAnalyzer::TokenType::Command &&
|
|
||||||
token1.data.toByteArray() == "endbfrange")
|
|
||||||
{
|
{
|
||||||
break;
|
PDFLexicalAnalyzer::Token token1 = parser.fetch();
|
||||||
|
|
||||||
|
if (token1.type == PDFLexicalAnalyzer::TokenType::Command &&
|
||||||
|
token1.data.toByteArray() == "endbfrange")
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
PDFLexicalAnalyzer::Token token2 = parser.fetch();
|
||||||
|
PDFLexicalAnalyzer::Token token3 = parser.fetch();
|
||||||
|
|
||||||
|
std::pair<unsigned int, unsigned int> from = fetchCode(token1);
|
||||||
|
std::pair<unsigned int, unsigned int> to = fetchCode(token2);
|
||||||
|
CID cid = fetchUnicode(token3);
|
||||||
|
|
||||||
|
entries.emplace_back(from.first, to.first, qMax(from.second, to.second), cid);
|
||||||
}
|
}
|
||||||
|
|
||||||
PDFLexicalAnalyzer::Token token2 = parser.fetch();
|
|
||||||
PDFLexicalAnalyzer::Token token3 = parser.fetch();
|
|
||||||
|
|
||||||
std::pair<unsigned int, unsigned int> from = fetchCode(token1);
|
|
||||||
std::pair<unsigned int, unsigned int> to = fetchCode(token2);
|
|
||||||
CID cid = fetchUnicode(token3);
|
|
||||||
|
|
||||||
entries.emplace_back(from.first, to.first, qMax(from.second, to.second), cid);
|
|
||||||
}
|
}
|
||||||
else if (command == "begincidrange")
|
else if (command == "begincidrange")
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user