When using traditional algorithms to describe graphic languages, the results obtained are not accurate due to the lack of strict standards. In this case, the size and position of the graphic display cannot be accurately determined. Aiming at these problems, we propose a new automatic typesetting algorithm for graphic languages. Use the constant method to calculate the display size of buffered images in graphic design. The ant colony algorithm is used to solve the optimal solution, so that the optimal display position of the graphics in the graphic design can be obtained. Graphics are powerful. For example, excellent graphics such as the presentation of forms, the expression and transmission of information, often make people feel relaxed and empathetic, shorten the distance between each other, and make communication smoother. As a result, graphic languages have become an important part of modern graphic design and are used more and more frequently. This paper attempts to analyze the representation of graphic language, aiming to demonstrate its important role in graphic design.