.. Copyright (c) 2008-2016 OpenShot Studios, LLC
(http://www.openshotstudios.com). This file is part of
OpenShot Video Editor (http://www.openshot.org), an open-source project
dedicated to delivering high quality video editing and animation solutions
to the world.
.. OpenShot Video Editor is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.. OpenShot Video Editor is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.. You should have received a copy of the GNU General Public License
along with OpenShot Library. If not, see .
.. _text_ref:
Titles / Text
=============
OpenShot Cloud API can render high-quality vector titles and text on top of any video, and utilizes the populate
SVG vector file format.
Create Dynamic Titles
---------------------
There is a convenience api endpoint (:ref:`title_endpoint_ref`) to create a dynamic SVG file object, and automatically add it to your project's
list of File objects. This is an easy way to generate SVG titles without custom programming on your backend.
Limitations with SVG Rendering
------------------------------
While most SVG properties are respected, some text effects and advanced properties are ignored. If you have an issue with rendering
an SVG title, you might try simplifying it, or splitting your title up into multiple SVG files (and layering them using different File and Clip
objects in OpenShot Cloud API).
SVG Files
---------
We also recommend creating a template SVG file in a desktop vector program (such as `Inkscape `_), with the font, text size,
color, stroke, and fill already set. This is a simple text/XML file format, and can be modified easily by any
programming language. Replace the text on your back-end for each title, and upload this as a new File in OpenShot
Cloud API. Now you can add this file to your timeline as a Clip, and just make sure you place it on a track/layer above
other clips, so it will appear on top.
Example SVG Contents
--------------------
.. code-block:: xml
.. image:: images/title.png
Fonts
-----
The installed fonts can be found at ``/usr/share/fonts``, and OpenShot Cloud API includes many open-source fonts by default.
You can retrieve all installed fonts with the :ref:`fonts_endpoint_ref` endpoint.
To install a custom font, manually copy the file to ``/usr/share/fonts`` or POST ``font_file`` to :ref:`fonts_endpoint_ref`.
Fonts are cached for performance reasons, so this might require a restart of your OpenShot Cloud API instance
if you don't see your new font listed, or any POST to :ref:`fonts_endpoint_ref` endpoint will update the font cache.
You can also preview a JPEG thumbnail of all installed fonts with the :ref:`fonts_thumbnail_endpoint_ref` endpoint.