My platform is Ubuntu Linux x64 with wxPython 2.8.12.1 (gtk2-unicode).
My app draws text to a printer device context. I wish to print text in Ubuntu Condensed font face but only the default font appears on printouts. In the print preview the correct font face is used which makes me think the font face (Ubuntu Condensed) is installed correctly and usable but there is some problem sending it to a printer device context.
Please examine the attached code. I am fairly certain it’s coded properly but ya never know. The code will produce a small window with:
- a static text that shows the version of wxPython you are using
- a button for print previewing some test text
- a second button for sending the same test text to a printer
The first line of test text is intended to be in the default font while the second and third lines are intended to be in Ubuntu Condensed face. The condensed face is used where intended in the print preview but only the default face gets used on the actual printout.
The Ubuntu Condensed font face shows up as a face in the wx.DEFAULT font family in a demo app I found which demos use of the font enumerator method so it seems to be installed correctly. The fact it gets used in print previews is further proof.
Other font families (eg. wx.TELETYPE) print out correctly.