       not d.timestamp? or timestamp - d.timestamp > max_screen_time or d.timestamp > timestamp
     .remove()
 
+hPxPerLetter = 156
+vPxPerLetter = 250
+hPxPerLetterSm = 93
+
 drawReferee = (referee, is_blue_left) ->
   #d3.select("#time_left").datum(referee).html((d) -> ticks_to_time(d.stage_time_left))
   svg.select(".time-left").datum(referee.stage_time_left)
     .text(ticks_to_time)
+    .attr("textLength", (d) -> ticks_to_time(d).length * hPxPerLetterSm)
 
   [left, right] = if is_blue_left then [referee.blue, referee.yellow] else [referee.yellow, referee.blue]
 
   svg.select(".left-name").datum(left)
     .text((d) -> d.name)
+    .attr("textLength", (d) -> d.name.length * hPxPerLetter)
 
   svg.select(".right-name").datum(right)
     .text((d) -> d.name)
+    .attr("textLength", (d) -> d.name.length * hPxPerLetter)
 
   persistTip("#{stg2txt(referee.stage)}: #{cmd2txt(referee.command)}")
   window.referee = referee

# Time voodoo: converting ticks to minutes:seconds
#XXX: tried to use moment.js without success
ticks_to_time = (ticks) ->
  #TODO: time may be negative, ought to represent that
  if ticks?
    time = "#{pad(~~(Math.abs(ticks) / (60 * 1000000)), 2, " ")}:#{pad(Math.abs(~~(ticks / 1000000)) % 60, 2)}"
    if ticks > 0 then time else "-#{time}"


  f.select(".field-line")
    .transition()
    .duration(transitionDuration)
    .attr("d", field_path)

  f.select(".left-goal")
    .classed("blue", is_blue_left)
    .classed("yellow", not is_blue_left)
    .transition()
    .duration(transitionDuration)
    .attr("d", left_goal_path)

  f.select(".right-goal")
    .classed("blue", not is_blue_left)
    .classed("yellow", is_blue_left)
    .transition()
    .duration(transitionDuration)
    .attr("d", right_goal_path)

  sp = 25

  f.select(".time-left")
    .transition()
    .duration(transitionDuration)
    .attr("x", 2)
    .attr("y", (f) -> -f.field_width / 2 - sp)

  f.select(".left-name")
    .transition()
    .duration(transitionDuration)
    .attr("x", (f) -> -f.field_length / 2 + sp)
    .attr("y", (f) -> -f.field_width / 2 + sp + vPxPerLetter)

  f.select(".right-name")
    .transition()
    .duration(transitionDuration)
    .attr("x", (f) -> f.field_length / 2 - sp)
    .attr("y", (f) -> -f.field_width / 2 + sp + vPxPerLetter)

# in miliseconds
max_screen_time = 100
