public FillResult tryFillCanvas(TextMetaInfo textInfo,
			StyleConfig styleConfig) {
		FillResult result = new FillResult();
		int maxCanvasHeight = styleConfig.getCanvasHeight();
		// 所有textLine取出来，算出最高的
		// 在这里用set过滤掉指向相同文本的textLine，相同文字的图片块在画布上只绘制一次
		Set<TextLine> textLineList = new HashSet<TextLine>();
		int maxLineHeight = Integer.MIN_VALUE;
		for (Entry<String, TextField> textFieldentry : textInfo
				.getTextFieldMap().entrySet()) {
			for (TextLine textLine : textFieldentry.getValue().getTextLines()) {
				if (textLine.getHeight() > maxLineHeight) {
					maxLineHeight = textLine.getHeight();
				}
				textLineList.add(textLine);
			}
		}
		// 按高度区间分类，每个区间最高为上一区间最高值的一半
		Map<Integer, List<TextLine>> textLineListMap = new HashMap<Integer, List<TextLine>>();
		for (TextLine textLine : textLineList) {
			int height = maxLineHeight;
			while (textLine.getHeight() <= height / 2) {
				height = height / 2;
			}
			List<TextLine> list = textLineListMap.get(height);
			if (list == null) {
				list = new ArrayList<TextLine>();
				textLineListMap.put(height, list);
			}

			list.add(textLine);
		}
		// 为每个区间排序
		for (Entry<Integer, List<TextLine>> entry : textLineListMap.entrySet()) {
			Collections.sort(entry.getValue(), new Comparator<TextLine>() {

				@Override
				public int compare(TextLine o1, TextLine o2) {
					return o2.getWidth() - o1.getWidth();
				}
			});
		}
		// 算画布宽度
		int maxWidth = _calculateMaxWidth(textInfo, styleConfig);
		// 填充
		List<CanvasInfo> canvasList = _fill(textLineListMap, maxLineHeight,
				maxWidth, maxCanvasHeight);
		result.setCanvasInfoList(canvasList);
		result.setTextInfo(textInfo);
		return result;
	}