Name

ST_Letters — Returns the input letters rendered as geometry with a default start position at the origin and default text height of 100.

Synopsis

geometry ST_Letters(text letters, json font);

설명

Uses a built-in font to render out a string as a multipolygon geometry. The default text height is 100.0, the distance from the bottom of a descender to the top of a capital. The default start position places the start of the baseline at the origin. Over-riding the font involves passing in a json map, with a character as the key, and base64 encoded TWKB for the font shape, with the fonts having a height of 1000 units from the bottom of the descenders to the tops of the capitals.

The text is generated at the origin by default, so to reposition and resize the text, first apply the ST_Scale function and then apply the ST_Translate function.

2.1.0 버전부터 사용할 수 있습니다.

예시: 경계 상자 폴리곤을 빌드하기

SELECT ST_AsText(ST_Letters('Yo'), 1);

Letters generated by ST_Letters

Example: Scaling and moving words

SELECT ST_Translate(ST_Scale(ST_Letters('Yo'), 10, 10), 100,100);

참고

ST_AsTWKB, ST_Scale, ST_Translate