old_contents: var Kerning = {
    set : function(cur_char, prev_text, next_text){
      if(cur_char.isKakkoStart()){
        this._setKerningStart(cur_char, prev_text);
      } else if(cur_char.isKakkoEnd() || cur_char.isKutenTouten()){
        this._setKerningEnd(cur_char, next_text);
      }
    },
    _setKerningStart : function(cur_char, prev_text){
      var space_rate = this._getTextSpaceStart(cur_char, prev_text);
      if(space_rate > 0){
        cur_char.spaceRateStart = space_rate;
      }
    },
    _setKerningEnd : function(cur_char, next_text){
      var space_rate = this._getTextSpaceEnd(cur_char, next_text);
      if(space_rate > 0){
        cur_char.spaceRateEnd = space_rate;
      }
    },
    _getTextSpaceStart : function(cur_char, prev_text){
      if(prev_text === null){
        return 0.5;
      }
      if(Token.isChar(prev_text) && prev_text.isKakkoStart()){
        return 0;
      }
      return 0.5;
    },
    _getTextSpaceEnd : function(cur_char, next_text){
      if(next_text === null){
        return 0.5;
      }
      if(Token.isChar(next_text) && (next_text.isKakkoEnd() || next_text.isKutenTouten())){
        return 0;
      }
      return 0.5;
    }
  };
  
new_contents: // notice charactors that can be shurinked is already shurinked in it's body size calculation in nehan.js.
  // so this module only 'add' the space to start/end direction, that are not requiered to be shurinked.
  var Kerning = {
    set : function(cur_char, prev_text, next_text){
      if(cur_char.isKakkoStart()){
        this._setKerningStart(cur_char, prev_text);
      } else if(cur_char.isKakkoEnd() || cur_char.isKutenTouten()){
        this._setKerningEnd(cur_char, next_text);
      }
    },
    _setKerningStart : function(cur_char, prev_text){
      var space_rate = this._getTextSpaceStart(cur_char, prev_text);
      if(space_rate > 0){
        cur_char.spaceRateStart = space_rate;
      }
    },
    _setKerningEnd : function(cur_char, next_text){
      var space_rate = this._getTextSpaceEnd(cur_char, next_text);
      if(space_rate > 0){
        cur_char.spaceRateEnd = space_rate;
      }
    },
    _getTextSpaceStart : function(cur_char, prev_text){
      if(prev_text === null){
        return 0.5;
      }
      if(Token.isChar(prev_text) && prev_text.isKakkoStart()){
        return 0;
      }
      return 0.5;
    },
    _getTextSpaceEnd : function(cur_char, next_text){
      if(next_text === null){
        return 0.5;
      }
      if(Token.isChar(next_text) && (next_text.isKakkoEnd() || next_text.isKutenTouten())){
        return 0;
      }
      return 0.5;
    }
  };
  
subject: add comment