We have an existing C++ VS2005 dll project that we need to add a function to merge multiple font structure files together into a single font structure that can be loaded into the Win32 API call for TTLoadEmbeddedFont or convert them to a true type font.
The font structure files are supposed to be embedded in the original file by using the Microsoft? Font Embedding SDK I'm told.? So the files are embedded as multiple subsets and we need to merge those back into a single file to embedd in a different file format that requires a single subset of the font file instead of multiple ones.
I'll attach a zip file of a sample of the files.
Our programmer tried using several Microsoft tools and was not able to get the subsets to merge together so I don't know if one would have to define the binary header of the font structure files and write your own routine to merge the missing glyphs or if our programmer just wasn't doing something correct.? I would have thought that the Microsoft Font Embedding SDK would have a way to merge subsets together to start with.
Here's is the basic information of what our programmer tried.
MergeFontPackage was a tough API to use and I was able to use it with the embedded font data from the DWF file.
I had to load the font data using TTLoadEmbeddedFont, then use GDI GetFontData?, then use CreateFontPackage/TTFCFP_DELTA to get one of the input, then do same for the other input, but add 1 more call to MergeFontPackage/TTFMFP_SUBSET1 to get the other input, then call MergeFontPackage to make the actual merge. The merged data can be made embedable into a DWF test file after using TTEmbedFontFromFileA. This works if the source is from the same font file.
If I fetch the input data from 1 font file, say from the first page of the embedded DWF, then fetch the other input data from another font file, say from the second page, then MergeFontPackage? will return this error:
ERR_INVALID_MERGE_CHECKSUMS 1011 Trying to merge two fonts from different mother font.
## Deliverables
The ARchitxt_font_structure contains the font structure files from a sample file.