Hi!
Last day, I requested a pull request and merged it. #136 

I use another way to draw a paragraph on a PDF page.
Below is my code.

```cpp
std::string textOver255 = "12345糟姨集鞋南槍痕痰林托入笑為潮立碰慘紡命窯舒喬檔脊吸渣誘餓躁強瓣倚扣拼襯裙凈錄釀薯憂擇十肅亭宰都愉冬乃考摟償老居題釣盯侵臣騾購標搬輛映納銷蜂宋頭號鄭藝駛斥鏟遵饑絨挨草保示她房礙宜扶涼困供探濫裁鴨膏橫坦傍愧蜓山儀辜略機評疑寸浩韻挪墻含帆由化里肌目淹誤匹枕浸有協斯名哥其香響逼裂油館慰七狹置露河樓弊增熱懂劇難盞拘罵撇芽胡慧關準補必舌遼晴奏愛江掏疲番走芬秩撤搭饅槐伸填灣蝦載簾哄寫急病攤田惕次泡捏糧附刷李鉆解阿違嫁天塌句善訊夠衰唇險學欠堆弟貪爆徐太孤鎮膛婆褲傷謹憶鵝踢贈擔仗膀挽兄扔基窩幕裹血暴米政覆柴力豎悼劫肥書翁屑";

PdfMemDocument* document = new PdfMemDocument();

PdfFontManager* fontManager = &(document->GetFonts());
PdfFont* font = &(fontManager->GetOrCreateFontFromBuffer(bufferview(fontBytes, fontSize)));

// Draw a XObjectForm
unique_ptr<PdfXObjectForm> xObjectPtr = document->CreateXObjectForm(Rect(0, 0, 720, 1280));
PdfXObjectForm* xObject = xObjectPtr.get();

PdfPainter* painter1 = new PdfPainter();
painter1->SetCanvas(*xObject);

PdfGraphicsStateWrapper* graphicsState = &(painter1->GraphicsState);
graphicsState->SetFillColor(PdfColor(0, 0, 0));
graphicsState->SetStrokeColor(PdfColor(0, 0, 0));

PdfTextStateWrapper* textState = &(painter1->TextState);
textState->SetFont(*font, 12);

painter1->DrawTextMultiLine(textOver255, 0, 0, 720, 1280);

painter1->FinishDrawing();

delete painter1;

// Draw XObjectForm to Page
PdfPageCollection* pages = &(document->GetPages());
PdfPage* page = &(pages->CreatePage(Rect(0, 0, 720, 1280)));

PdfPainter* painter2 = new PdfPainter();
painter2->SetCanvas(*page);
painter2->DrawXObject(*xObject, 0, 0, 1.0, 1.0);

painter2->FinishDrawing();

delete painter2;

vector<char>* pdfVector = new std::vector<char>();
PoDoFo::VectorStreamDevice outputStreamDevice(*pdfVector);

fontManager->EmbedFonts();
document->Save(outputStreamDevice);

delete document;
delete pdfVector;
```

The produced PDF:
[Error.pdf](https://github.com/podofo/podofo/files/14400118/Error.pdf)

In Adobe Acrobat Reader, the display looks like:
![Error_AcrobatReader.png](https://github.com/podofo/podofo/assets/56328238/650c6e43-cc0f-47b1-96a7-bd521fb6a815)

But in Firefox, the display looks like:
![Error_Firefox.png](https://github.com/podofo/podofo/assets/56328238/0dc74286-f1fe-4979-b3a7-9e5cb2174337)

I think Firefox treats the cmap encode 01 and 0100 are duplicated and make it display with error result.
![Error_Structure.png](https://github.com/podofo/podofo/assets/56328238/4695b4c2-ed5e-442e-9c7e-e9b7f300fd5d)

So,
I changed some code to make the produced cmap encoding padding start with zero.
I acknowledge that the modification may not be suitable for PdfDynamicEncoding,
but I just want to conduct some tests.

Change:
https://github.com/podofo/podofo/blob/af33808ffe42113d37d574af3c2bfae78c5e5686/src/podofo/main/PdfFont.cpp#L702

To:
```cpp
code = PdfCharCode(m_DynamicToUnicodeMap->GetSize(), 2); 
```

And

Change:
https://github.com/podofo/podofo/blob/af33808ffe42113d37d574af3c2bfae78c5e5686/src/podofo/main/PdfFont.cpp#L789

To:
```cpp
auto inserted = m_SubsetGIDs.try_emplace(gid, PdfCID(PdfCharCode((unsigned)m_SubsetGIDs.size() + 1, 2)));
```

The produced PDF:
[Error_Padding.pdf](https://github.com/podofo/podofo/files/14400256/Error_Padding.pdf)

In Adobe Acrobat Reader, the display looks good.
![Error_Padding_AcrobatReader.png](https://github.com/podofo/podofo/assets/56328238/98f730f2-e13c-4746-b5ca-e9bd90c1be1c)

In Firefox, the display looks also good.
![Error_Padding_Firefox.png](https://github.com/podofo/podofo/assets/56328238/421ab5d7-7a93-4e65-9224-4e48efeebddf)

But!
In the macOS PDF previewer,
Everything goes wrong....
![Error_Padding_MacOS.jpg](https://github.com/podofo/podofo/assets/56328238/d2545605-6698-48d3-b644-8f7bffc99b42)

I have no idea how to solve it.
I've checked the /ToUnicode and /Encoding encoding, and they are correct!
![Error_Padding_cmap.png](https://github.com/podofo/podofo/assets/56328238/00129420-19fb-4b31-96dc-53fcf72f7f65)


cmap generated by PdfDynamicEncoding is displayed differently in different readers
This is a GitHub Issue
repo:podofo
owner:podofo
Title : cmap generated by PdfDynamicEncoding is displayed differently in different readers
Issue date:

--- start body ---
Hi!
Last day, I requested a pull request and merged it. #136 

I use another way to draw a paragraph on a PDF page.
Below is my code.

```cpp
std::string textOver255 = "12345糟姨集鞋南槍痕痰林托入笑為潮立碰慘紡命窯舒喬檔脊吸渣誘餓躁強瓣倚扣拼襯裙凈錄釀薯憂擇十肅亭宰都愉冬乃考摟償老居題釣盯侵臣騾購標搬輛映納銷蜂宋頭號鄭藝駛斥鏟遵饑絨挨草保示她房礙宜扶涼困供探濫裁鴨膏橫坦傍愧蜓山儀辜略機評疑寸浩韻挪墻含帆由化里肌目淹誤匹枕浸有協斯名哥其香響逼裂油館慰七狹置露河樓弊增熱懂劇難盞拘罵撇芽胡慧關準補必舌遼晴奏愛江掏疲番走芬秩撤搭饅槐伸填灣蝦載簾哄寫急病攤田惕次泡捏糧附刷李鉆解阿違嫁天塌句善訊夠衰唇險學欠堆弟貪爆徐太孤鎮膛婆褲傷謹憶鵝踢贈擔仗膀挽兄扔基窩幕裹血暴米政覆柴力豎悼劫肥書翁屑";

PdfMemDocument* document = new PdfMemDocument();

PdfFontManager* fontManager = &(document->GetFonts());
PdfFont* font = &(fontManager->GetOrCreateFontFromBuffer(bufferview(fontBytes, fontSize)));

// Draw a XObjectForm
unique_ptr<PdfXObjectForm> xObjectPtr = document->CreateXObjectForm(Rect(0, 0, 720, 1280));
PdfXObjectForm* xObject = xObjectPtr.get();

PdfPainter* painter1 = new PdfPainter();
painter1->SetCanvas(*xObject);

PdfGraphicsStateWrapper* graphicsState = &(painter1->GraphicsState);
graphicsState->SetFillColor(PdfColor(0, 0, 0));
graphicsState->SetStrokeColor(PdfColor(0, 0, 0));

PdfTextStateWrapper* textState = &(painter1->TextState);
textState->SetFont(*font, 12);

painter1->DrawTextMultiLine(textOver255, 0, 0, 720, 1280);

painter1->FinishDrawing();

delete painter1;

// Draw XObjectForm to Page
PdfPageCollection* pages = &(document->GetPages());
PdfPage* page = &(pages->CreatePage(Rect(0, 0, 720, 1280)));

PdfPainter* painter2 = new PdfPainter();
painter2->SetCanvas(*page);
painter2->DrawXObject(*xObject, 0, 0, 1.0, 1.0);

painter2->FinishDrawing();

delete painter2;

vector<char>* pdfVector = new std::vector<char>();
PoDoFo::VectorStreamDevice outputStreamDevice(*pdfVector);

fontManager->EmbedFonts();
document->Save(outputStreamDevice);

delete document;
delete pdfVector;
```

The produced PDF:
[Error.pdf](https://github.com/podofo/podofo/files/14400118/Error.pdf)

In Adobe Acrobat Reader, the display looks like:
![Error_AcrobatReader.png](https://github.com/podofo/podofo/assets/56328238/650c6e43-cc0f-47b1-96a7-bd521fb6a815)

But in Firefox, the display looks like:
![Error_Firefox.png](https://github.com/podofo/podofo/assets/56328238/0dc74286-f1fe-4979-b3a7-9e5cb2174337)

I think Firefox treats the cmap encode 01 and 0100 are duplicated and make it display with error result.
![Error_Structure.png](https://github.com/podofo/podofo/assets/56328238/4695b4c2-ed5e-442e-9c7e-e9b7f300fd5d)

So,
I changed some code to make the produced cmap encoding padding start with zero.
I acknowledge that the modification may not be suitable for PdfDynamicEncoding,
but I just want to conduct some tests.

Change:
https://github.com/podofo/podofo/blob/af33808ffe42113d37d574af3c2bfae78c5e5686/src/podofo/main/PdfFont.cpp#L702

To:
```cpp
code = PdfCharCode(m_DynamicToUnicodeMap->GetSize(), 2); 
```

And

Change:
https://github.com/podofo/podofo/blob/af33808ffe42113d37d574af3c2bfae78c5e5686/src/podofo/main/PdfFont.cpp#L789

To:
```cpp
auto inserted = m_SubsetGIDs.try_emplace(gid, PdfCID(PdfCharCode((unsigned)m_SubsetGIDs.size() + 1, 2)));
```

The produced PDF:
[Error_Padding.pdf](https://github.com/podofo/podofo/files/14400256/Error_Padding.pdf)

In Adobe Acrobat Reader, the display looks good.
![Error_Padding_AcrobatReader.png](https://github.com/podofo/podofo/assets/56328238/98f730f2-e13c-4746-b5ca-e9bd90c1be1c)

In Firefox, the display looks also good.
![Error_Padding_Firefox.png](https://github.com/podofo/podofo/assets/56328238/421ab5d7-7a93-4e65-9224-4e48efeebddf)

But!
In the macOS PDF previewer,
Everything goes wrong....
![Error_Padding_MacOS.jpg](https://github.com/podofo/podofo/assets/56328238/d2545605-6698-48d3-b644-8f7bffc99b42)

I have no idea how to solve it.
I've checked the /ToUnicode and /Encoding encoding, and they are correct!
![Error_Padding_cmap.png](https://github.com/podofo/podofo/assets/56328238/00129420-19fb-4b31-96dc-53fcf72f7f65)


--- end body ---

None