| 
			
			 | 
		#1 | 
| 
			
			
			
			 Sigil developer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,274 
				Karma: 1101600 
				Join Date: Jan 2011 
				Location: UK 
				
				
				Device: Kindle PW, K4 NT, K3, Kobo Touch 
				
				
				 | 
	
	
	
		
		
			
			 
				
				Is there a way to set font for messagebox details?
			 
			
			
			When using info_dialog, I now use the details option for added information.  One annoying quirk is that, at least on Ubuntu 10.10, the font of the details box is not a fixed font, and its not using HTML.  While this is fine for most things, it makes lining up columns of information difficult - so I either need to put the second column of data on the separate line (using spaces to indent) or accept a wavy column. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Haven't seen a way around this in searching. I think its using the system font which obviously I don't want to change. Any suggestions of settings/functions that can allow me to use a fixed font or HTML in the details section?  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			dialog = info_dialog(..., show=False) 
		
	
		
		
		
		
		
		
		
		
		
		
	
	font = QFont() font.setFamily('monospace') dialog.det_msg.setFont(font)  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Sigil developer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,274 
				Karma: 1101600 
				Join Date: Jan 2011 
				Location: UK 
				
				
				Device: Kindle PW, K4 NT, K3, Kobo Touch 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Works perfectly.  That was really beginning to bother me  
		
	
		
		
		
		
		
		
		
		
		
		
	
	    again
		 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Sigil developer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,274 
				Karma: 1101600 
				Join Date: Jan 2011 
				Location: UK 
				
				
				Device: Kindle PW, K4 NT, K3, Kobo Touch 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			An update on this - everything worked fine under Ubuntu, but on Windows I had to change it to 
		
	
		
		
		
		
		
		
		
		
		
		
	
	font.setFamily('Courier') font.setFixedPitch(True) Not sure Courier is needed, but the fixed pitch was otherwise it was ragged.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			You would need to select a truetype/type 1 font family. Monospace probably selects the microsoft bitmapped system fonts. 
		
	
		
		
		
		
		
		
		
		
		
		
	
	If you can check for font existence, then (I think) 'Lucida Console' is a nicer font than Courier, because it is sans serif.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#6 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			You need to set the stylehint on the qfont to moonospace, dont use an explicit family name.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Default font set? | brainycat | PocketBook | 13 | 06-03-2010 04:19 AM | 
| Book Details - Size of Font | adrian1944 | Calibre | 1 | 02-18-2010 07:12 PM | 
| feed to lrf, how do I change font (or have default font) | lovemov | Calibre | 3 | 03-16-2009 11:57 PM | 
| Set default font for LRF? | daruking | Calibre | 15 | 03-03-2009 07:26 PM | 
| PRS-500 Japanese Font Details? | damo | Sony Reader Dev Corner | 7 | 10-24-2007 06:51 PM |