docs
Loading...
Searching...
No Matches
CAPI_Config.h
Go to the documentation of this file.
1///
2/// Copyright (C) 2026 Ultralight, Inc. All rights reserved.
3/// A license is required for commercial use. https://ultralig.ht
4///
5
6///
7/// @file CAPI_Config.h
8///
9/// Core configuration for the renderer.
10///
11/// `#include <Ultralight/CAPI/CAPI_Config.h>`
12///
13/// These are various configuration options that can be used to customize the behavior of the
14/// library. These options can only be set once before creating the Renderer.
15///
16#ifndef ULTRALIGHT_CAPI_CONFIG_H
17#define ULTRALIGHT_CAPI_CONFIG_H
18
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26/******************************************************************************
27 * Config
28 *****************************************************************************/
29
30///
31/// How much checking and warning the library does for mistakes made through one of its APIs.
32///
33/// Warnings go to the Logger at kLogLevel_Warning, tagged with the API they came from (eg,
34/// `[js]`, `[dom]`, `[data]`), and to the page's console when a page is involved.
35///
36/// @see ulConfigSetJavaScriptDiagnostics(), ulConfigSetDOMDiagnostics()
37///
38typedef enum {
39 ///
40 /// No per-operation warnings (a mistake the library only finds once, like an invalid setup
41 /// call, still warns).
42 ///
44
45 ///
46 /// Development warnings about each mistake as it happens.
47 ///
49
50 ///
51 /// Everything kULDiagnosticsLevel_Warn reports, plus stricter checks (eg, a lossy argument
52 /// conversion in a JavaScript binding becomes a TypeError, and every DOM call on a NULL handle
53 /// warns).
54 ///
56
57 ///
58 /// Warn when developer mode is on, Off when it's off (see ulConfigSetDeveloperMode()).
59 ///
62
63///
64/// How the library renders pixel fonts.
65///
66/// A pixel font is a monochrome bitmap font, or an outline font the library detects as drawn
67/// on a pixel grid. Color fonts are never pixel fonts.
68///
69/// Pages can override this per element with the `-ul-font-rendering` CSS property. The value
70/// `auto` follows this setting, while `smooth` and `pixelated` take precedence over it.
71///
72/// @note Using `pixelated` on a monochrome font that isn't a pixel font draws it aliased (hard
73/// edges, no antialiasing) on whole pixels. Color fonts ignore the property.
74///
75/// @see ulConfigSetPixelFontRendering()
76///
77typedef enum {
78 ///
79 /// Render pixel fonts like other text-- edges stay antialiased with fractional glyph placement.
80 /// Bitmap glyphs scale smoothly to the font size.
81 ///
83
84 ///
85 /// Keep pixel fonts crisp-- hard pixel edges with every glyph on a whole device pixel.
86 ///
87 /// At any size, the font's pixels are enlarged by repeating device pixels. By default the used
88 /// size moves to a whole multiple of the font's design size (see
89 /// ulConfigSetSnapPixelFontSize()); with that off, at a size that isn't a whole multiple, some
90 /// font pixels draw one device pixel wider than others.
91 ///
92 /// Glyph advances, letter-spacing and word-spacing round to whole device pixels. Because of
93 /// this, a line's width at fractional device scales can differ slightly from other browsers.
94 ///
95 /// @note An outline pixel font below its design size renders like other text.
96 ///
99
100///
101/// Create config with default values (see <Ultralight/platform/Config.h>).
102///
103/// @return Returns a new ULConfig instance. You must call ulDestroyConfig() when finished.
104///
106
107///
108/// Destroy a ULConfig instance created by ulCreateConfig().
109///
110/// @param config The config to destroy (can be NULL).
111///
113
114///
115/// A writable OS file path to store persistent Session data in.
116///
117/// This data may include cookies, cached network resources, indexed DB, etc.
118///
119/// @note Files are only written to the path when using a persistent Session.
120///
122
123///
124/// The relative path to the resources folder (loaded via the FileSystem API).
125///
126/// The library loads certain resources (SSL certs, ICU data, etc.) from the FileSystem API
127/// during runtime (eg, `file:///resources/cacert.pem`).
128///
129/// You can customize the relative file path to the resources folder by modifying this setting.
130///
131/// (Default = "resources/")
132///
133ULExport void ulConfigSetResourcePathPrefix(ULConfig config, ULString resource_path_prefix);
134
135///
136/// The winding order for front-facing triangles.
137///
138/// @pre Only used when GPU rendering is enabled for the View.
139///
140/// (Default = kFaceWinding_CounterClockwise)
141///
143
144///
145/// The hinting algorithm to use when rendering fonts. (Default = kFontHinting_Normal)
146///
147/// Leave this at kFontHinting_Normal to take the hinting from the font profile (see
148/// ulConfigSetFontProfile()). Any other value overrides the profile.
149///
150/// When analytic text is enabled (the default, see ulConfigSetEnablePhotonText()), hinting
151/// applies only to upright text (no rotation or skew) smaller than the analytic text size cutoff
152/// (see ulConfigSetPhotonTextMinPx()). Larger or rotated text renders from unhinted outlines.
153/// When analytic text is disabled, hinting applies to upright text of every size.
154///
155/// @note Pixel fonts rendered as pixel art (kPixelFontRendering_Pixelated) ignore this setting.
156///
157/// @see ULFontHinting
158///
160
161///
162/// The font-appearance preset providing default values for the text rendering knobs (font
163/// gamma, font contrast, font stem darkening, font embolden). Knobs you set explicitly override
164/// the preset's values. (Default = kFontProfile_Default)
165///
166/// @see ULFontProfile
167///
169
170///
171/// Set how antialiased glyph edges are blended into the page (Default = kFontBlendMode_Profile,
172/// meaning the font profile's value).
173///
174/// @see ULFontBlendMode
175///
177
178///
179/// The gamma to use when compositing font glyphs, change this value to adjust contrast (Adobe and
180/// Apple prefer 1.8, others may prefer 2.2). Set to 0 to use the value from the font profile.
181/// (Default = 0, meaning the profile's value; the default profile uses 2.2)
182///
183ULExport void ulConfigSetFontGamma(ULConfig config, double font_gamma);
184
185///
186/// Additional contrast enhancement applied when compositing font glyphs. Values above 0 thicken
187/// the midtones of antialiased glyph edges, increasing apparent text weight at every size. The
188/// useful range is 0.0 (none) to about 1.0. Set below 0 to use the value from the font profile.
189/// (Default = -1.0, meaning the profile's value; the default profile uses 0.3)
190///
191ULExport void ulConfigSetFontContrast(ULConfig config, double font_contrast);
192
193///
194/// Stem-darkening strength for rendered text. Boosts the coverage of antialiased glyph pixels
195/// so thin stems keep their apparent weight on light backgrounds; each preset shapes how the
196/// boost varies with glyph size. Text on dark backgrounds is unaffected. Set below 0 to use the
197/// value from the font profile. (Default = -1.0, meaning the profile's value)
198///
199ULExport void ulConfigSetFontStemDarkening(ULConfig config, double font_stem_darkening);
200
201///
202/// Extra stroke weight applied to glyph shapes, as a fraction of the font size (for example,
203/// 0.01 widens stems by roughly 1% of the em). Applies uniformly at every size and on both
204/// light and dark backgrounds; glyph advances and layout are unaffected. Set below 0 to use the
205/// value from the font profile. (Default = -1.0, meaning the profile's value)
206///
207/// @note This does not apply to pixel fonts rendered as pixel art (see ULPixelFontRendering)--
208/// they keep the weight they were drawn with.
209///
210ULExport void ulConfigSetFontEmbolden(ULConfig config, double font_embolden);
211
212///
213/// Set how pixel fonts are rendered. (Default = kPixelFontRendering_Pixelated)
214///
215/// @param config The config to modify.
216///
217/// @param mode The rendering mode for pixel fonts.
218///
219/// @see ULPixelFontRendering
220///
222
223///
224/// Set whether or not to adjust the used size of pixel fonts so each font pixel covers a whole
225/// number of device pixels at the current device scale (see ULPixelFontRendering).
226/// (Default = True)
227///
228/// The library chooses the closest size the font can draw without scaling. For bitmap fonts,
229/// this means strike sizes and their whole multiples. For outline pixel fonts, it means the
230/// design size and its whole multiples. Ties go to the larger size. A size below half the
231/// smallest such size is left unchanged. This applies with either ULPixelFontRendering value;
232/// text styled `-ul-font-rendering: smooth` keeps its size.
233///
234/// For an 8 px design at 1.25x:
235/// ```
236/// font-size: 16px -> 20 device px -> 24 device px (19.2px used)
237/// font-size: 12px -> 15 device px -> 16 device px (12.8px used)
238/// ```
239///
240/// The computed style (eg, `getComputedStyle()`, `em` units) keeps the size the page asked for.
241///
242/// Pass false to keep the size the page asked for. Pixel fonts then scale to that size, and at a
243/// size that isn't a whole multiple of the font's design size some font pixels draw one device
244/// pixel wider than others.
245///
246/// @param config The config to modify.
247///
248/// @param enabled Whether or not to snap pixel font sizes.
249///
250/// @note Text set in a pixel font can grow or shrink with the device scale (and at a 1x scale
251/// when the page asks for a size the font can't draw 1:1), so layout changes too. Fixed
252/// line heights and boxes sized in `em` don't follow the text.
253///
255
256///
257/// Global user-defined CSS string (included before any CSS on the page).
258///
259/// You can use this to override default styles for various elements on the page.
260///
261/// @note This is an actual string of CSS, not a file path.
262///
264
265///
266/// Whether or not to continuously repaint any Views, regardless if they are dirty.
267///
268/// This is mainly used to diagnose painting/shader issues and profile performance.
269///
270/// (Default = False)
271///
272ULExport void ulConfigSetForceRepaint(ULConfig config, bool enabled);
273
274///
275/// Whether or not GPU-accelerated Views render vector content (path fills and strokes)
276/// analytically instead of tessellating it to triangles. Analytic rendering is
277/// resolution-independent: edges stay crisp under any zoom or transform.
278///
279/// Path rendering on CPU-rendered Views is unaffected. Disabling this also disables analytic
280/// text (see ulConfigSetEnablePhotonText).
281///
282/// (Default = True)
283///
284ULExport void ulConfigSetEnablePhoton(ULConfig config, bool enabled);
285
286///
287/// Whether or not text and color emoji also render analytically when analytic vector rendering
288/// is enabled (see ulConfigSetPhotonTextMinPx for the size cutoff). Ignored when analytic vector
289/// rendering is disabled.
290///
291/// This selects the text appearance for both renderers: CPU-rendered Views match the analytic
292/// look (unhinted outlines, fractional glyph placement) so output stays near-identical across
293/// renderers.
294///
295/// (Default = True)
296///
298
299///
300/// The minimum on-screen glyph size, in pixels, at which text renders analytically when analytic
301/// text is enabled; smaller glyphs use the rasterized glyph atlas. Set to 0 to render all text
302/// analytically. (Default = 16)
303///
304ULExport void ulConfigSetPhotonTextMinPx(ULConfig config, unsigned int min_px);
305
306///
307/// Additional delay (in seconds) on top of the engine's internal page-settled detection.
308///
309/// Increase this if you want a little more assurance that the page has fully settled (animations
310/// finished, late-arriving network activity complete) before ulViewIsSettled() flips and the
311/// page-settled callback fires, at the cost of additional wait time.
312///
313/// (Default = 0.1)
314///
315/// @see ulViewSetPageSettledCallback()
316///
318
319///
320/// The number of consecutive idle samples the library requires before it declares a page settled.
321///
322/// Together with the settle tick this sets the shortest time a page can take to settle (cycles *
323/// tick). Lower it to settle sooner, at the cost of tolerance for late layout or paint.
324///
325/// (Default = 5)
326///
327/// @see ulConfigSetPageSettleTick()
328///
329ULExport void ulConfigSetPageSettleCycles(ULConfig config, unsigned int cycles);
330
331///
332/// How often (in seconds) the library samples a loading page for idleness. (Default = 0.006)
333///
334/// @see ulConfigSetPageSettleCycles()
335///
337
338///
339/// The interval (in seconds) at which the library automatically recycles internal caches and
340/// reclaims memory.
341///
342/// The library performs this lightweight recycle for you from inside ulUpdate() / ulRender(). It
343/// is cheap enough to be invisible at typical frame rates, and letting the library drive it on
344/// this timer is the recommended approach.
345///
346/// Set to 0 to disable the automatic recycler entirely, for applications that prefer to call
347/// ulRecycle() on their own schedule.
348///
349/// (Default = 0.5)
350///
351ULExport void ulConfigSetRecycleDelay(ULConfig config, double delay);
352
353///
354/// Whether the library automatically collects garbage and returns freed memory to the OS without
355/// embedder involvement.
356///
357/// When a page builds up a large JavaScript heap and then goes quiet, that memory would otherwise
358/// stay resident until the next burst of activity or an explicit ulRecycle() / ulPurgeMemory().
359/// With this enabled, the library collects on its own and pushes the freed memory back to the OS,
360/// so the process footprint drifts back down after heavy content.
361///
362/// @note Reclamation only happens while ulUpdate() is being pumped. An application that stops
363/// calling ulUpdate() while idle gets no automatic reclamation; call ulRecycle() /
364/// ulPurgeMemory() explicitly in that case.
365///
366/// (Default = True)
367///
368ULExport void ulConfigSetIdleGCEnabled(ULConfig config, bool enabled);
369
370///
371/// How long (in seconds) a page must be idle, with no user input, before automatic idle
372/// collection begins.
373///
374/// Lower values reclaim sooner after the user stops interacting; higher values wait longer before
375/// assuming the page is idle. Only used when idle GC is enabled.
376///
377/// (Default = 2.0)
378///
379/// @see ulConfigSetIdleGCEnabled()
380///
381ULExport void ulConfigSetIdleGCIdleTime(ULConfig config, double idle_time);
382
383///
384/// The size of the library's memory cache in bytes.
385///
386/// @note You should increase this if you anticipate handling pages with large resources, Safari
387/// typically uses 128+ MiB for its cache.
388///
389/// (Default = 256 * 1024 * 1024)
390///
391ULExport void ulConfigSetMemoryCacheSize(ULConfig config, unsigned int size);
392
393///
394/// The number of pages to keep in the cache. (Default: 0, none)
395///
396/// @note
397/// \parblock
398///
399/// Safari typically caches about 5 pages and maintains an on-disk cache to support typical
400/// web-browsing activities.
401///
402/// If you increase this, you should probably increase the memory cache size as well.
403///
404/// \endparblock
405///
406/// (Default = 0)
407///
408ULExport void ulConfigSetPageCacheSize(ULConfig config, unsigned int size);
409
410///
411/// Memory vs. performance tuning for the renderer's HTML / JavaScript engine heaps. See the
412/// ULMemoryProfile enumerators for the effect of each profile.
413///
414/// Read once when the Renderer is created. (Default = kMemoryProfile_Balanced)
415///
416/// @see ULMemoryProfile
417///
419
420///
421/// The system's physical RAM size in bytes.
422///
423/// JavaScriptCore tries to detect the system's physical RAM size to set reasonable allocation
424/// limits. Set this to anything other than 0 to override the detected value. Size is in bytes.
425///
426/// This can be used to force JavaScriptCore to be more conservative with its allocation strategy
427/// (at the cost of some performance).
428///
429ULExport void ulConfigSetOverrideRAMSize(ULConfig config, unsigned int size);
430
431///
432/// The minimum size of large VM heaps in JavaScriptCore.
433///
434/// Set this to a lower value to make these heaps start with a smaller initial value.
435///
436/// Set to 0 to derive this value from the renderer's memory profile.
437///
438/// (Default = 0)
439///
440ULExport void ulConfigSetMinLargeHeapSize(ULConfig config, unsigned int size);
441
442///
443/// The minimum size of small VM heaps in JavaScriptCore.
444///
445/// Set this to a lower value to make these heaps start with a smaller initial value.
446///
447/// (Default = 1 * 1024 * 1024)
448///
449ULExport void ulConfigSetMinSmallHeapSize(ULConfig config, unsigned int size);
450
451///
452/// A soft target for the total JavaScriptCore heap size, in bytes.
453///
454/// This is not a hard limit: the heap may grow beyond this target. When it does, the garbage
455/// collector treats the heap as under memory pressure and reclaims more aggressively to bring it
456/// back toward the target.
457///
458/// Set to 0 to derive this value from the memory profile.
459///
460/// (Default = 0)
461///
462/// @see ulConfigSetMemoryProfile()
463///
464ULExport void ulConfigSetMaxHeapSize(ULConfig config, unsigned int size);
465
466///
467/// The number of threads to use in the Renderer (for parallel painting on the CPU, etc.).
468///
469/// You can set this to a certain number to limit the number of threads to spawn. Values above
470/// the number of hardware threads are clamped to it.
471///
472/// Set to `0` (the default) to use 8 threads (or fewer on machines with fewer hardware threads).
473///
474ULExport void ulConfigSetNumRendererThreads(ULConfig config, unsigned int num_renderer_threads);
475
476///
477/// The max amount of time (in seconds) to allow repeating timers to run during each call to
478/// Renderer::Update.
479///
480/// The library will attempt to throttle timers if this time budget is exceeded.
481///
482/// (Default = 1.0 / 200.0)
483///
484ULExport void ulConfigSetMaxUpdateTime(ULConfig config, double max_update_time);
485
486///
487/// The row alignment (in bytes) of the BitmapSurface when using the CPU renderer.
488///
489/// The underlying bitmap associated with each BitmapSurface will have row_bytes padded to reach
490/// this alignment. This must be a power of two (or 0, see below).
491///
492/// Aligning the bitmap helps improve performance when using the CPU renderer. Determining the
493/// proper value to use depends on the CPU architecture and max SIMD instruction set used.
494///
495/// We generally target the 128-bit SSE2 instruction set across most PC platforms so '16' is a safe
496/// value to use.
497///
498/// You can set this to '0' to perform no padding (row_bytes will always be width * 4) at a slight
499/// cost to performance.
500///
501/// (Default = 16)
502///
503ULExport void ulConfigSetBitmapRowAlignment(ULConfig config, unsigned int bitmap_row_alignment);
504
505///
506/// The quality of effects (blurs, CSS filters, SVG filters, etc.) to use when rendering.
507///
508/// (Default = kEffectQuality_Medium)
509///
510/// @see ULEffectQuality
511///
513
514///
515/// Whether to ignore SSL certificate errors when using the built-in network backend.
516///
517/// When set to true, SSL certificate verification will be disabled, allowing connections
518/// to servers with self-signed or invalid certificates.
519///
520/// @warning This reduces security and should never be enabled in production.
521///
522/// (Default = false)
523///
525
526///
527/// Whether to validate TLS server certificates against the operating system's certificate
528/// store instead of the certificate bundle shipped with the application (resources/cacert.pem).
529///
530/// When true, certificates trusted by the host operating system (including enterprise or
531/// user-installed roots) are honored and the bundled list is not used.
532///
533/// Currently honored on Windows. On platforms where the OS trust store is not yet supported,
534/// this option is ignored and the bundled list is used.
535///
536/// (Default = false)
537///
539
540///
541/// Whether to paint full layers when dirty instead of just the dirty subregion.
542///
543/// This can be useful for debugging rendering issues or when dirty region tracking
544/// is causing artifacts.
545///
546/// @note Enabling this will impact performance as entire layers are redrawn.
547///
548/// (Default = false)
549///
551
552///
553/// The interval (in milliseconds) at which the library samples and emits resource counters
554/// (memory usage, VRAM, cache sizes, etc.) via the Profiler's EmitCounter() callback.
555///
556/// Set to 0 to disable resource counter sampling entirely; scopes and events are unaffected.
557///
558/// (Default = 500)
559///
560ULExport void ulConfigSetResourceSampleInterval(ULConfig config, unsigned int interval_ms);
561
562///
563/// Set whether or not the library runs in developer mode (Default = false).
564///
565/// Developer mode turns the kULDiagnosticsLevel_Auto levels into kULDiagnosticsLevel_Warn, and
566/// lets the diagnostics environment variables (`UL_JS_DIAGNOSTICS`, `UL_DOM_DIAGNOSTICS`) override
567/// them. You should turn it on in your development builds and leave it off in the builds you ship
568/// (a release library ignores those variables when developer mode is off, so a shipped app's
569/// behavior can't be changed from its environment). Each variable takes `off`, `warn`, or
570/// `strict`.
571///
572/// @param config The config.
573///
574/// @param developer_mode Whether or not to run in developer mode.
575///
576ULExport void ulConfigSetDeveloperMode(ULConfig config, bool developer_mode);
577
578///
579/// Set the diagnostics level for JavaScript APIs that leave their own level at the default
580/// (Default = kULDiagnosticsLevel_Auto).
581///
582/// @param config The config.
583///
584/// @param level The diagnostics level.
585///
587
588///
589/// Set the diagnostics level for the DOM API and data bindings
590/// (Default = kULDiagnosticsLevel_Auto).
591///
592/// @param config The config.
593///
594/// @param level The diagnostics level.
595///
597
598///
599/// Set the least severe level the library sends to the Logger; less severe messages are dropped
600/// (Default = kLogLevel_Info).
601///
602/// Diagnostics warnings are sent at kLogLevel_Warning, so a minimum of kLogLevel_Error or
603/// kLogLevel_Fatal hides them.
604///
605/// @param config The config.
606///
607/// @param level The minimum log level.
608///
610
611#if UL_HAS(MEDIA)
612///
613/// The memory-vs-performance profile for the HTML5 media subsystem.
614///
615/// Picks a tradeoff between peak memory per media element and playback smoothness / seek
616/// responsiveness. The value is read once when each media element starts loading and stays fixed
617/// for that element's lifetime; later changes apply only to subsequently-loaded elements.
618///
619/// (Default = kMediaProfile_Balanced)
620///
621/// @pre Requires the Pro edition or higher.
622///
623/// @see ULMediaProfile
624///
626#endif // UL_HAS(MEDIA)
627
628#ifdef __cplusplus
629} // extern "C"
630#endif
631
632#endif // ULTRALIGHT_CAPI_CONFIG_H
void ulConfigSetEffectQuality(ULConfig config, ULEffectQuality quality)
The quality of effects (blurs, CSS filters, SVG filters, etc.) to use when rendering.
void ulConfigSetResourceSampleInterval(ULConfig config, unsigned int interval_ms)
The interval (in milliseconds) at which the library samples and emits resource counters (memory usage...
void ulConfigSetDeveloperMode(ULConfig config, bool developer_mode)
Set whether or not the library runs in developer mode (Default = false).
void ulConfigSetPaintFullLayers(ULConfig config, bool enabled)
Whether to paint full layers when dirty instead of just the dirty subregion.
void ulConfigSetMediaProfile(ULConfig config, ULMediaProfile media_profile)
The memory-vs-performance profile for the HTML5 media subsystem.
void ulConfigSetEnablePhotonText(ULConfig config, bool enabled)
Whether or not text and color emoji also render analytically when analytic vector rendering is enable...
void ulConfigSetPageCacheSize(ULConfig config, unsigned int size)
The number of pages to keep in the cache.
void ulConfigSetPixelFontRendering(ULConfig config, ULPixelFontRendering mode)
Set how pixel fonts are rendered.
void ulConfigSetFaceWinding(ULConfig config, ULFaceWinding winding)
The winding order for front-facing triangles.
void ulConfigSetUserStylesheet(ULConfig config, ULString css_string)
Global user-defined CSS string (included before any CSS on the page).
void ulConfigSetSnapPixelFontSize(ULConfig config, bool enabled)
Set whether or not to adjust the used size of pixel fonts so each font pixel covers a whole number of...
void ulConfigSetOverrideRAMSize(ULConfig config, unsigned int size)
The system's physical RAM size in bytes.
ULDiagnosticsLevel
How much checking and warning the library does for mistakes made through one of its APIs.
Definition CAPI_Config.h:38
@ kULDiagnosticsLevel_Warn
Development warnings about each mistake as it happens.
Definition CAPI_Config.h:48
@ kULDiagnosticsLevel_Off
No per-operation warnings (a mistake the library only finds once, like an invalid setup call,...
Definition CAPI_Config.h:43
@ kULDiagnosticsLevel_Auto
Warn when developer mode is on, Off when it's off (see ulConfigSetDeveloperMode()).
Definition CAPI_Config.h:60
@ kULDiagnosticsLevel_Strict
Everything kULDiagnosticsLevel_Warn reports, plus stricter checks (eg, a lossy argument conversion in...
Definition CAPI_Config.h:55
void ulConfigSetMinSmallHeapSize(ULConfig config, unsigned int size)
The minimum size of small VM heaps in JavaScriptCore.
void ulConfigSetMaxHeapSize(ULConfig config, unsigned int size)
A soft target for the total JavaScriptCore heap size, in bytes.
void ulConfigSetFontProfile(ULConfig config, ULFontProfile font_profile)
The font-appearance preset providing default values for the text rendering knobs (font gamma,...
void ulConfigSetIdleGCIdleTime(ULConfig config, double idle_time)
How long (in seconds) a page must be idle, with no user input, before automatic idle collection begin...
void ulConfigSetNumRendererThreads(ULConfig config, unsigned int num_renderer_threads)
The number of threads to use in the Renderer (for parallel painting on the CPU, etc....
void ulConfigSetForceRepaint(ULConfig config, bool enabled)
Whether or not to continuously repaint any Views, regardless if they are dirty.
void ulConfigSetMemoryProfile(ULConfig config, ULMemoryProfile memory_profile)
Memory vs.
void ulDestroyConfig(ULConfig config)
Destroy a ULConfig instance created by ulCreateConfig().
void ulConfigSetFontBlendMode(ULConfig config, ULFontBlendMode font_blend_mode)
Set how antialiased glyph edges are blended into the page (Default = kFontBlendMode_Profile,...
void ulConfigSetResourcePathPrefix(ULConfig config, ULString resource_path_prefix)
The relative path to the resources folder (loaded via the FileSystem API).
void ulConfigSetMinLargeHeapSize(ULConfig config, unsigned int size)
The minimum size of large VM heaps in JavaScriptCore.
void ulConfigSetPhotonTextMinPx(ULConfig config, unsigned int min_px)
The minimum on-screen glyph size, in pixels, at which text renders analytically when analytic text is...
void ulConfigSetMaxUpdateTime(ULConfig config, double max_update_time)
The max amount of time (in seconds) to allow repeating timers to run during each call to Renderer::Up...
void ulConfigSetCachePath(ULConfig config, ULString cache_path)
A writable OS file path to store persistent Session data in.
void ulConfigSetFontEmbolden(ULConfig config, double font_embolden)
Extra stroke weight applied to glyph shapes, as a fraction of the font size (for example,...
void ulConfigSetRecycleDelay(ULConfig config, double delay)
The interval (in seconds) at which the library automatically recycles internal caches and reclaims me...
void ulConfigSetPageSettleCycles(ULConfig config, unsigned int cycles)
The number of consecutive idle samples the library requires before it declares a page settled.
void ulConfigSetIgnoreSSLErrors(ULConfig config, bool enabled)
Whether to ignore SSL certificate errors when using the built-in network backend.
void ulConfigSetPageSettleTick(ULConfig config, double tick)
How often (in seconds) the library samples a loading page for idleness.
void ulConfigSetPageSettleDelay(ULConfig config, double delay)
Additional delay (in seconds) on top of the engine's internal page-settled detection.
void ulConfigSetFontGamma(ULConfig config, double font_gamma)
The gamma to use when compositing font glyphs, change this value to adjust contrast (Adobe and Apple ...
void ulConfigSetFontStemDarkening(ULConfig config, double font_stem_darkening)
Stem-darkening strength for rendered text.
void ulConfigSetBitmapRowAlignment(ULConfig config, unsigned int bitmap_row_alignment)
The row alignment (in bytes) of the BitmapSurface when using the CPU renderer.
ULConfig ulCreateConfig(void)
Create config with default values (see <Ultralight/platform/Config.h>).
void ulConfigSetIdleGCEnabled(ULConfig config, bool enabled)
Whether the library automatically collects garbage and returns freed memory to the OS without embedde...
void ulConfigSetMinLogLevel(ULConfig config, ULLogLevel level)
Set the least severe level the library sends to the Logger; less severe messages are dropped (Default...
void ulConfigSetFontContrast(ULConfig config, double font_contrast)
Additional contrast enhancement applied when compositing font glyphs.
void ulConfigSetJavaScriptDiagnostics(ULConfig config, ULDiagnosticsLevel level)
Set the diagnostics level for JavaScript APIs that leave their own level at the default (Default = kU...
void ulConfigSetEnablePhoton(ULConfig config, bool enabled)
Whether or not GPU-accelerated Views render vector content (path fills and strokes) analytically inst...
void ulConfigSetDOMDiagnostics(ULConfig config, ULDiagnosticsLevel level)
Set the diagnostics level for the DOM API and data bindings (Default = kULDiagnosticsLevel_Auto).
void ulConfigSetMemoryCacheSize(ULConfig config, unsigned int size)
The size of the library's memory cache in bytes.
void ulConfigSetUseSystemCertificateStore(ULConfig config, bool enabled)
Whether to validate TLS server certificates against the operating system's certificate store instead ...
void ulConfigSetFontHinting(ULConfig config, ULFontHinting font_hinting)
The hinting algorithm to use when rendering fonts.
ULPixelFontRendering
How the library renders pixel fonts.
Definition CAPI_Config.h:77
@ kPixelFontRendering_Pixelated
Keep pixel fonts crisp– hard pixel edges with every glyph on a whole device pixel.
Definition CAPI_Config.h:97
@ kPixelFontRendering_Smooth
Render pixel fonts like other text– edges stay antialiased with fractional glyph placement.
Definition CAPI_Config.h:82
User-defined logging interface.
ULLogLevel
The severity of a log message, from most to least severe.
Definition CAPI_Logger.h:44
Various defines and utility functions for the C API.
ULFaceWinding
The winding order for front-facing triangles.
Definition CAPI_Defines.h:339
struct C_String * ULString
Opaque handle to a String object.
Definition CAPI_Defines.h:96
struct C_Config * ULConfig
Opaque handle to a Config object.
Definition CAPI_Defines.h:75
#define ULExport
Definition CAPI_Defines.h:42
ULMemoryProfile
Memory vs.
Definition CAPI_Defines.h:459
ULFontBlendMode
How antialiased glyph edges are blended into the page.
Definition CAPI_Defines.h:411
ULEffectQuality
The quality level for rendering effects (CSS filters, shadows, blurs, etc.).
Definition CAPI_Defines.h:434
ULFontProfile
The font-appearance preset that provides default values for the text rendering knobs.
Definition CAPI_Defines.h:384
ULFontHinting
The font hinting algorithm to use when rendering glyphs.
Definition CAPI_Defines.h:349
ULMediaProfile
Memory vs.
Definition CAPI_Defines.h:489