src/Pure/GUI/gui.scala
changeset 59230 cae3ef2897f2
parent 59201 702e0971d617
child 59286 ac74eedb910a
--- a/src/Pure/GUI/gui.scala	Thu Jan 01 16:08:12 2015 +0100
+++ b/src/Pure/GUI/gui.scala	Thu Jan 01 17:27:52 2015 +0100
@@ -215,20 +215,20 @@
 
   /* font operations */
 
-  def font_metrics(font: Font): LineMetrics =
+  def line_metrics(font: Font): LineMetrics =
     font.getLineMetrics("", new FontRenderContext(null, false, false))
 
   def imitate_font(family: String, font: Font, scale: Double = 1.0): Font =
   {
     val font1 = new Font(family, font.getStyle, font.getSize)
-    val size = font_metrics(font).getHeight.toDouble / font_metrics(font1).getHeight * font.getSize
+    val size = line_metrics(font).getHeight.toDouble / line_metrics(font1).getHeight * font.getSize
     font1.deriveFont((scale * size).toInt)
   }
 
   def imitate_font_css(family: String, font: Font, scale: Double = 1.0): String =
   {
     val font1 = new Font(family, font.getStyle, font.getSize)
-    val rel_size = font_metrics(font).getHeight.toDouble / font_metrics(font1).getHeight
+    val rel_size = line_metrics(font).getHeight.toDouble / line_metrics(font1).getHeight
     "font-family: " + family + "; font-size: " + (scale * rel_size * 100).toInt + "%;"
   }