Information Classification: External Restricted.
See https://www.chili-publish.com/security
Fonts XML
XML Structure
Fonts are a top-level resource within a document, containing a list of ?Document Object Model - Font items:
<document> <fonts> <item id="123-456-789" name="Arial Bold" family="Arial" style="Bold" /> <item id="123-456-789" name="Arial Bold Italic" family="Arial" style="Bold Italic" /> </fonts> </document>
Unlike typical lists, the data within the XML needs to match the font's attributes on the CHILI server. More specifically, you need to get the font's definition XML, and duplicate the attributes required by the document (id, name, family and style).
So we are talking about two types of "Font" here. One is the font on the server (a resource item, managed through CHILI's backoffice. See ?Font Management), and a font inside the XML of a document (?Document Object Model - Font). A bit confusing, but we hope you can see the logic in this.
To attain the definition XML of a font "Resource Item", you can use various API functions (?Webservice Functions - ResourceItemAdd, ??Webservice Functions - ResourceItemGetByPath, ?Webservice Functions - ResourceSearch, etc...). On the server, CHILI will analyze the new (or existing) font file, and extract the relevant metadata (family and style). Even when generating the XML from within an application which knows the fonts (eg: our own InDesign Extension), this logic is used to make sure that that metadata is consistent.
NOTE: for display purposes, CHILI Editor inserts the last downloaded "swfURL" in the XML. You can ignore this when creating or updating your own XML, it is not read by the editor, only inserted into the XML
Referencing Fonts
Another difference with other types of lists is the fact that fonts (in the context of a TextFlow or text format) are referenced not by ID, but by an internal name (family + "_" + style): ?TextFlow and ITextLayoutFormat XML
Default Content
If no "fonts" node is present within the document (or if it does not contain any items), CHILI Editor will automatically add a "Arial Regular" font, which can be referenced as "Arial_Regular" within text flows and formats.
All information on this page must be treated as External Restricted, or more strict. https://www.chili-publish.com/security