epam / epam/Indigo

Extend Indigo API to accept fonts

Open
#3,880 0 comments 0 reactions 1 assignee Claimed by @konstantin-mordovskih View on GitHub
Dominant language
C++
Stars
406
Forks
134
Avg merge
2d 11h
Merged PRs (30d)
24

Description

Extend the Indigo interface to accept and forward an optional TTF font object.

**Agreed approach:**

Ketcher sends custom TTF fonts directly in **POST /v2/indigo/render** via **options.fonts** with bundled JSON string.

```
{
"options": {
"fonts": "[
{
"name": "Arial Bold",
"data": ""
},
{
"name": "Arial Italic",
"data": ""
}
]"
}
}
```

**data** contains the Base64-encoded TTF file.
**name** is used only for logging/debugging and does not affect font selection.
Indigo parses the supplied fonts with FreeType and detects their style.
For each KET text part, Indigo selects the first matching font face based on existing **bold / italic** flags.

{
  "text": "test",
  "bold": true,
  "italic": true
}

This should use the first supplied **bold italic** font face.

If no matching custom font is available, Indigo falls back to the existing default rendering.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.