Change the Font on just the specific Unicode characters while saving to PDF with Golang via C++

Example

The following screenshot compares the two output PDFs generated by the sample code below.

One is generated without setting the PdfSaveOptions.IsFontSubstitutionCharGranularity property, and the other was generated after setting the PdfSaveOptions.IsFontSubstitutionCharGranularity property to true.

As you can see in the first PDF, the font of the entire sentence has changed from Times New Roman to Arial Unicode MS because of the Non-Breaking Hyphen. While in the second PDF, only the font of the Non-Breaking Hyphen has changed.

First PDF File
todo:image_alt_text
Second PDF File
todo:image_alt_text

Sample Code