mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 08:32:43 +00:00 
			
		
		
		
	LibHTML: Failed font lookups should use a bold fallback when fitting
If we fail to find the font specified by a page, but we do have some font-weight information, use a bold fallback font for bold weights.
This commit is contained in:
		
							parent
							
								
									1fd5869490
								
							
						
					
					
						commit
						dce7646882
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -89,7 +89,11 @@ void StyleProperties::load_font() const | ||||||
| 
 | 
 | ||||||
|     if (file_name.is_null()) { |     if (file_name.is_null()) { | ||||||
|         dbg() << "Failed to find a font for family " << font_family << " weight " << font_weight; |         dbg() << "Failed to find a font for family " << font_family << " weight " << font_weight; | ||||||
|         m_font = Font::default_font(); | 
 | ||||||
|  |         if (font_weight == "bold") | ||||||
|  |             m_font = Font::default_bold_font(); | ||||||
|  |         else | ||||||
|  |             m_font = Font::default_font(); | ||||||
|         return; |         return; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling