mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:22:45 +00:00 
			
		
		
		
	 69c33bd4ca
			
		
	
	
		69c33bd4ca
		
	
	
	
	
		
			
			Before this change we always returned the font's point size as the x-height which was basically never correct. We now get it from the OS/2 table (if one with version >= 2 is available in the file). Otherwise we fall back to using the ascent of the 'x' glyph. Most fonts appear to have a sufficiently modern OS/2 table.
		
			
				
	
	
		
			8 lines
		
	
	
		
			No EOL
		
	
	
		
			129 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			8 lines
		
	
	
		
			No EOL
		
	
	
		
			129 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!doctype html><style>
 | |
| div {
 | |
|     font: 20px SerenitySans;
 | |
|     width: 10ex;
 | |
|     height: 15ex;
 | |
|     background: red;
 | |
| }
 | |
| </style><div> |