字体

RESTAPI允许您列出但不修改geoserver中可用的字体。在上载样式文件之前,使用此操作可以验证样式文件中使用的字体是否可用。

备注

阅读 API reference for /fonts .

获取所有字体的列表

以JSON格式列出服务器上的所有字体:

请求

卷曲

curl -u admin:geoserver -XGET http://localhost:8080/geoserver/rest/fonts.json

响应

{"fonts":["Calibri Light Italic","Microsoft PhagsPa Bold","Lucida Sans Typewriter Oblique","ChaparralPro-Regular","Californian FB Italic"]}

以XML格式列出服务器上的所有字体:

请求

卷曲

curl -u admin:geoserver -XGET http://localhost:8080/geoserver/rest/fonts.xml

响应

<root>
  <fonts>
    <entry>Calibri Light Italic</entry>
    <entry>Microsoft PhagsPa Bold</entry>
    <entry>Lucida Sans Typewriter Oblique</entry>
    <entry>ChaparralPro-Regular</entry>
    <entry>Californian FB Italic</entry>
  </fonts>
</root>
Previous: 关于
Next: 层组