1. A method of automatically determining text font in an image, comprising: inputting image data; inputting training data, the training data including a plurality of training sets for a plurality of font classes; determining a sequence of chain code segments for a sample in the input image data; determining a font class in the training sets with a highest probability using probabilities for chain codes of the training sets; and determining the text font of the input image data as the font class in the training sets with the highest probability.