mirror of
				https://github.com/JakubMelka/PDF4QT.git
				synced 2025-06-05 21:59:17 +02:00 
			
		
		
		
	Issue #72: Cannot select text
This commit is contained in:
		| @@ -2102,22 +2102,25 @@ PDFFontCMap PDFFontCMap::createFromData(const QByteArray& data) | ||||
|             } | ||||
|             else if (command == "beginbfrange") | ||||
|             { | ||||
|                 PDFLexicalAnalyzer::Token token1 = parser.fetch(); | ||||
|  | ||||
|                 if (token1.type == PDFLexicalAnalyzer::TokenType::Command && | ||||
|                     token1.data.toByteArray() == "endbfrange") | ||||
|                 while (true) | ||||
|                 { | ||||
|                     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") | ||||
|             { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user