fonts.rst 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. .. _rest_fonts:
  2. Fonts
  3. =====
  4. The REST API allows you to list—but not modify—fonts available in GeoServer. It can be useful to use this operation to verify if a font used in a style file is available before uploading it.
  5. .. note:: Read the :api:`API reference for /fonts <fonts.yaml>`.
  6. Getting a list of all fonts
  7. ---------------------------
  8. **List all fonts on the server, in JSON format:**
  9. *Request*
  10. .. admonition:: curl
  11. ::
  12. curl -u admin:geoserver -XGET http://localhost:8080/geoserver/rest/fonts.json
  13. *Response*
  14. .. code-block:: json
  15. {"fonts":["Calibri Light Italic","Microsoft PhagsPa Bold","Lucida Sans Typewriter Oblique","ChaparralPro-Regular","Californian FB Italic"]}
  16. **List all fonts on the server, in XML format:**
  17. *Request*
  18. .. admonition:: curl
  19. ::
  20. curl -u admin:geoserver -XGET http://localhost:8080/geoserver/rest/fonts.xml
  21. *Response*
  22. .. code-block:: xml
  23. <root>
  24. <fonts>
  25. <entry>Calibri Light Italic</entry>
  26. <entry>Microsoft PhagsPa Bold</entry>
  27. <entry>Lucida Sans Typewriter Oblique</entry>
  28. <entry>ChaparralPro-Regular</entry>
  29. <entry>Californian FB Italic</entry>
  30. </fonts>
  31. </root>