DWF not loading drawables for some layers

@sking500,
thank you very much for such valuable information.

One last quick note. The font substitution is not working for characters above char(255) on the client’s machine which is running Windows Server 2012R2. However, it is working from my laptop which is running Windows 10 Home.

I checked the fonts and Arial is installed. I even tried several other fonts installed on the client’s machine but ran into the same problem.

I am not sure why the discrepancy but one more hurdle to overcome. I will try to figure it out and let you know the result.

1 Like

@sking500,
thank you.

Hopefully this is my final comment regarding this issue but I wanted to share what I have learned.

On my laptop (Windows 10 Home), the only font that supports the UTF32 characters in my client’s drawing files is Segoe UI Symbol. Even though Arial is specified, it seems to be “falling back” to Segoe UI Symbol for the characters in question.

In the final analysis, it appears that Windows, on my client’s computer, has no “fall back” font that can handle symbols over a value of 9000. In fact, it has no fonts, at all, that can handle these characters.

As a result, it prints an empty square.

I have written my own bitmap rendering tool to read the DWF using Aspose.CAD and use the resulting CAD Image data to render it as a standard Bitmap using the System.Drawing libraries with very good results. I will try copying my Segoe UI Symbol font to their computer but not overwrite their Segoe UI Symbol TTF file, load my file from the separate folder and use it to render the symbols. Hopefully this solves it.

I will make one final post indicating the results.

Thank you,
Sam

I am going

1 Like

@sking500,
thank you, this is useful for us too.

So in the final analysis, I ended up copying my own Segoe UI Symbol font file to their server, load the file into a PrivateFontCollection and fetch it from there for my DWF to Bitmap conversion engine. Whenever I hit a symbol (> ASCII 128), I have it draw the text using the font from the private font collection, which works perfectly.

I could not find anywhere if the Aspose.CAD libraries support private font collections. If not I would highly recommend they do as it is a nice option for older Windows versions.

Also, I am still having the use the character substitutions from my original post, where the DWF file loads `, n and g instead of +/-, radius and cylinder symbols as the AsciiString value of the DWFWhipText object. If you could keep me informed of progress on this issue I would appreciate it.

@sking500,
I believe the problem is fixed on our side, but I can not promise fix will appear in the upcoming 22.9 release, likely in 22.10.
We have also the request for support loading of fonts from stream, propably, it may be useful for your cases too.