With the /fonts endpoint user can manage the database fonts.
GET
/api/Fonts/Get
Get all configured fonts
Request Example
/api/Fonts/Get
Response Example
[ { "FontPreviewUrl": null, "AllowedCharacters": null, "XOffset": 0.0, "YOffset": 0.0, "UpperCase": true, "LowerCase": false, "IncludesNumbers": false, "IsRaised": false, "MinCharacters": 1, "MaxCharacters": 5, "UseTTF": false, "DefaultLineSpacing": 0.0, "Active": true, "IsTwoLineFont": false, "IsUniteFinalTextGeometry": true, "IsSvgFont": false, "TextSvgStrokeOutline": 0, "FontName": "string", "FontNameExisting": "4", "PulseFont": "Signature Script", "FontType": "embroidery-template", "LocationName": null, "IsMixedCase": false, "DescenderFactor": false, "HangingLetters": null, "SpecialCharacters": null, "Recipe": null, "PricingSKU": null, "MinHeight": null, "MaxHeight": null, "GravotechFont": null, "GravotechKernings": [], "ModernMonogramCaseHandling": "as-is", "Source": null, "MinFontHeight": null, "MaxFontHeight": null, "CaseProcessing": "NoCaseProcessing", "CharacterSeperator": null, "CompanyId": 2, "Id": 123 } ]
GET
/api/Fonts/GetFonts
Get all configured fonts with options
Request Example
/api/Fonts/GetFonts?dataView=1&getAllowedChars=true dataView is optional parameter. Default is 0. Set 1 for basic fonts details getAllowedChars is optional parameter. Default is false. Set true for getting allowed characters for each font
Response Example
[ { "FontName": "Argentia", "AllowedCharacters": [ "A","%"...,"Z" ], "MinFontHeight": 10, "MaxFontHeight": 65, "MinCharacters": 0, "MaxCharacters": 200, "UpperCase": true, "LowerCase": true, "FontPreviewUrl": "http://{api domain}/Widget/Fonts/Argentia.png", "IncludeNumbers": true, "SpecialCharacters": null, "IsRaised": false, "PricingSKU": "string" } ]
GET
/api/Fonts/GetAllowedChars/{id}
Get allowed characters for a font
Request Example
/api/Fonts/Get/GetAllowedChars/PulseFontName {id} is required parameter and represents the font name or pulse font to identify the db font to get its allowed chars
Response Example
[ " ", "!", "\"", "#", "%", "&", "'", "0", "1", "2", "Y", "Z", "\\", "`", "a", "b" ]
POST
/api/Fonts/Create
Create a font
Model Request Example
Default values are applied to attributes that are not provided in the request body Not nullable boolean attributes are set to false if not stated elsewise Not nullable number attributes are set to 0 if not stated elsewise { "FontName": "string", "SpecialCharacters": "string", "UpperCase": true, "LowerCase": true, "Active": true, [defaults to true] "IncludesNumbers": true, "MinCharacters": 0, [defaults to 1] "MaxCharacters": 0, [defaults to 2] "FontType": "string", [one or more comma separated types] "PulseFont": "Calibri", "LocationName": "string", "IsMixedCase": false, "DescenderFactor": false, "XOffset": 0, "YOffset": 0, "HangingLetters": "string", "IsRaised": false, "Recipe": "string", "PricingSKU": "string", "MinHeight": 0, "MaxHeight": 0, "UseTTF": false, "DefaultLineSpacing": 0, "GravotechFont": "string", "GravotechKernings": [ { "LeftChar": "char", "RightChar": "char", "Kerning": 0 }, { ... } ], "ModernMonogramCaseHandling": "string", [one of "as-is"(the default), "convert-to-upper", "lower-for-small-upper-for-big"] "IsTwoLineFont": false, "IsUniteFinalTextGeometry": true, [defaults to true] "Source": "string", "MinFontHeight": 0, "MaxFontHeight": 0, "IsSvgFont": false, "CaseProcessing": "string", [one of "NoCaseProcessing"(the default), "ConvertToUpperCase", "ConvertToLowerCase", "ConvertToProperCase"] "TextSvgStrokeOutline": 0 }
Response Example
If the operation is successful an empty response will be returned with status code 201 Otherwise an error with code and message will be returned with status code 409
PATCH
/api/Fonts/Update
Update a font
Request Example
/api/Fonts/Update?FontName=name FontName parameter is required to identify the font to update
Model Request Example
Only provided attributes are updated { "FontName": "string", "SpecialCharacters": "string", "UpperCase": true, "LowerCase": true, "IncludesNumbers": true, "MinCharacters": 0, "MaxCharacters": 0, "FontType": "string", [one or more comma separated types] "PulseFont": "Calibri", "LocationName": "string", "IsMixedCase": false, "DescenderFactor": false, "XOffset": 0, "YOffset": 0, "HangingLetters": "string", "IsRaised": false, "Recipe": "string", "PricingSKU": "string", "MinHeight": 0, "MaxHeight": 0, "UseTTF": false, "DefaultLineSpacing": 0, "GravotechFont": "string", "GravotechKernings": [ [if GravotechKernings attribute is provided they fully override existing kernings if any] { "LeftChar": "char", "RightChar": "char", "Kerning": 0, }, { ... } ], "ModernMonogramCaseHandling": "string", [one of "as-is", "convert-to-upper", "lower-for-small-upper-for-big"] "IsTwoLineFont": false, "IsUniteFinalTextGeometry": true, "Source": "string", "MinFontHeight": 0, "MaxFontHeight": 0, "IsSvgFont": false, "CaseProcessing": "string", [one of "NoCaseProcessing", "ConvertToUpperCase", "ConvertToLowerCase", "ConvertToProperCase"] "TextSvgStrokeOutline": 0 }
Response Example
If the operation is successful an empty response will be returned with status code 200 Otherwise an error with code and message will be returned with status code 409
DELETE
/api/Fonts/Delete
Delete a font
Request Example
/api/Styles/Delete?FontName=name FontName parameter is required in order to identify the font to delete
Response Example
If the operation is successful an empty response will be returned with status code 200 Otherwise an error with code and message will be returned with status code 409
POST
/api/Fonts/UploadEmbroideryFont
Upload an embroidery Font
Model Request Example
Data will be of type multipart/form-data with a .fon file to by uploaded
Response Example
If the operation is successful an empty response will be returned with status code 200 Otherwise an error with code and message will be returned with status code 409
GET
/api/Fonts/GetFontStyles
Get font styles by font family for print fonts
Request Example
/api/Fonts/GetFontStyles?family=Arial family - (Required) The font family
Response Example
[ "Narrow Italic", "Narrow Bold", "Narrow Bold Italic", "Narrow", "Bold Italic", "Italic", "Regular", "Bold", "Black" ]
GET
/api/Fonts/renderpngcached
Get a png image for the specified font
Request Example
/api/Fonts/renderpngcached?id=Arial id - (Required) The font name
Response Example
The response will be an image of the font.