selected font face used in print preview but not printout

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:

  1. a static text that shows the version of wxPython you are using
  2. a button for print previewing some test text
  3. 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.

···

Your attachment doesn't seem to have come through; at least I don't see it.

···

On Sat, Aug 10, 2013 at 3:04 PM, Brad Smith <posibradtone@gmail.com> wrote:

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:

Sorry, I forgot to attach it to my first post but it IS attached to this post.

prin_sample.py (3.42 KB)

···

On Saturday, 10 August 2013 16:34:14 UTC-6, Marc wrote:

On Sat, Aug 10, 2013 at 3:04 PM, Brad Smith posibr...@gmail.com wrote:

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:

Your attachment doesn’t seem to have come through; at least I don’t see it.