Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
List characters in a subset font |
Post Reply ![]() |
Author | |
rweetch ![]() Senior Member ![]() Joined: 22 Feb 11 Status: Offline Points: 173 |
![]() ![]() ![]() ![]() ![]() Posted: 18 May 18 at 4:06PM |
Is there anyway to get a list of the characters that are included in an embedded subset font?
|
|
![]() |
|
kevindebenu ![]() Moderator Group ![]() ![]() Joined: 16 Apr 12 Status: Offline Points: 7 |
![]() ![]() ![]() ![]() ![]() |
There isn't an existing QPL function to give the result directly.
It should be possible to loop through all the characters 0x0000 to 0xFFFF and use QP.GetTextWidth to find the width of just that character. If the width is zero, it can be assumed that character isn't in the subset character list. std::wstring CharSet = L""; for (int C = 0x0000; C <= 0xFFFF; C++) { if ((C % 100) == 0) { std::cout << C << std::endl; } if (QP.GetTextWidth((wchar_t)C + L"") > 0) { CharSet = CharSet + (wchar_t)C; } } Edited by kevindebenu - 23 May 18 at 2:21PM |
|
![]() |
|
rweetch ![]() Senior Member ![]() Joined: 22 Feb 11 Status: Offline Points: 173 |
![]() ![]() ![]() ![]() ![]() |
Thats being added to my class Helper! well, a Delphi version anyway.
thanks.
Edited by rweetch - 23 May 18 at 2:49PM |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store