     null
 
   getFontSize: ->
-    @state.fontSize
+    parseInt(getComputedStyle(@getTopmostDOMNode()).fontSize)
 
   setFontSize: (fontSize) ->
-    @setState({fontSize})
+    @getTopmostDOMNode().style.fontSize = fontSize + 'px'
+    @sampleFontStyling()
 
   getFontFamily: ->
-    @state.fontFamily
+    getComputedStyle(@getTopmostDOMNode()).fontFamily
 
   setFontFamily: (fontFamily) ->
-    @setState({fontFamily})
+    @getTopmostDOMNode().style.fontFamily = fontFamily
+    @sampleFontStyling()
 
   setLineHeight: (lineHeight) ->
-    @setState({lineHeight})
+    @getTopmostDOMNode().style.lineHeight = lineHeight
+    @sampleFontStyling()
 
   setShowIndentGuide: (showIndentGuide) ->
     @setState({showIndentGuide})

        @gutterBackgroundColor = gutterBackgroundColor
        @requestUpdate() unless suppressUpdate

  measureLineHeightAndDefaultCharWidthIfNeeded: (prevState) ->
    if not isEqualForProperties(prevState, @state, 'lineHeight', 'fontSize', 'fontFamily')
      if @visible
        @measureLineHeightAndDefaultCharWidth()
      else
        @measureLineHeightAndDefaultCharWidthWhenShown = true
    else if @measureLineHeightAndDefaultCharWidthWhenShown and @visible
      @measureLineHeightAndDefaultCharWidthWhenShown = false
      @measureLineHeightAndDefaultCharWidth()

  measureLineHeightAndDefaultCharWidth: ->
    @refs.lines.measureLineHeightAndDefaultCharWidth()

  remeasureCharacterWidthsIfNeeded: (prevState) ->
    if not isEqualForProperties(prevState, @state, 'fontSize', 'fontFamily')
      if @visible
        @remeasureCharacterWidths()
      else
        @remeasureCharacterWidthsIfVisibleAfterNextUpdate = true
    else if @remeasureCharacterWidthsIfVisibleAfterNextUpdate and @visible
      @remeasureCharacterWidthsIfVisibleAfterNextUpdate = false
      @remeasureCharacterWidths()

  remeasureCharacterWidths: ->
    @refs.lines.remeasureCharacterWidths()

  measureScrollbars: ->
    return unless @visible


    if @performedInitialMeasurement
      @measureScrollbars() if @measuringScrollbars

  performInitialMeasurement: ->
    @updatesPaused = true
    @measureHeightAndWidth()
    @sampleFontStyling()
    @sampleBackgroundColors()
    @measureScrollbars()
    @measureLineHeightAndDefaultCharWidth() if @measureLineHeightAndDefaultCharWidthWhenShown
    @remeasureCharacterWidths() if @remeasureCharacterWidthsWhenShown
    @props.editor.setVisible(true)
    @updatesPaused = false
    @performedInitialMeasurement = true
