docs
Loading...
Searching...
No Matches
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#pragma once
8#include <Ultralight/String.h>
10
11// X11's headers define None as a macro; FontHinting::None needs the plain identifier.
12#pragma push_macro("None")
13#undef None
14
15namespace ultralight {
16
17///
18/// The winding order for front-facing triangles. (Only used when the GPU renderer is used)
19///
20enum class FaceWinding : uint8_t {
21 ///
22 /// Clockwise Winding (Direct3D, etc.)
23 ///
25
26 ///
27 /// Counter-Clockwise Winding (OpenGL, etc.)
28 ///
30};
31
32///
33/// The font hinting algorithm to use when rendering glyphs.
34///
35/// @see Config::font_hinting
36///
37enum class FontHinting : uint8_t {
38 ///
39 /// Lighter hinting algorithm-- glyphs are slightly fuzzier but better resemble their original
40 /// shape. This is achieved by snapping glyphs to the pixel grid only vertically which better
41 /// preserves inter-glyph spacing.
42 ///
44
45 ///
46 /// Let the font profile choose-- Config::font_profile picks the hinting that suits its
47 /// appearance, which for every profile but FontProfile::Light means no hinting (Light keeps
48 /// light, vertical-only hinting).
49 ///
51
52 ///
53 /// Strongest hinting algorithm-- outputs only black/white glyphs. The result is usually
54 /// unpleasant if the underlying TTF does not contain hints for this type of rendering.
55 ///
57
58 ///
59 /// No hinting is performed-- fonts may be blurry at smaller font sizes.
60 ///
62};
63
64///
65/// The font-appearance preset that provides default values for the text rendering knobs
66/// (Config::font_blend_mode, Config::font_gamma, Config::font_contrast,
67/// Config::font_stem_darkening, Config::font_embolden, and the hinting behind
68/// FontHinting::Normal). Knobs you set explicitly override the preset's values.
69///
70/// @see Config::font_profile
71///
72enum class FontProfile : uint8_t {
73 ///
74 /// The standard appearance-- currently the same as WindowsLike.
75 ///
77
78 ///
79 /// Text with the weight and sharpness of Safari and other macOS applications.
80 ///
82
83 ///
84 /// Text with the crisp, moderate weight of mainstream browsers on Windows.
85 ///
87
88 ///
89 /// No weight compensation at all-- the thinnest appearance.
90 ///
92};
93
94///
95/// How antialiased glyph edges are blended into the page.
96///
97/// @see Config::font_blend_mode
98///
99enum class FontBlendMode : uint8_t {
100 ///
101 /// Use the value from the font profile.
102 ///
104
105 ///
106 /// Gamma-corrected blending-- edges read lighter with more contrast (how browsers on Windows
107 /// composite text).
108 ///
110
111 ///
112 /// Blend in sRGB space-- edges keep their full coverage (how macOS composites text).
113 ///
115};
116
117///
118/// The quality level for rendering effects (CSS filters, shadows, blurs, etc.).
119///
120/// The level trades the fidelity of large blurs and shadows for speed: lower levels process them
121/// at more aggressively reduced resolutions and with a tighter blur falloff.
122///
123/// @see Config::effect_quality
124///
125enum class EffectQuality : uint8_t {
126 ///
127 /// Fastest effect quality. Large blurs and shadows render at heavily reduced resolution and
128 /// with a truncated falloff, so they appear visibly coarser and tighter than at higher levels.
129 ///
131
132 ///
133 /// Default effect quality-- strikes a good balance between quality and performance.
134 ///
136
137 ///
138 /// Highest effect quality-- favors quality over performance.
139 ///
140 /// Only software (CPU) rendering processes very large blurs at higher working resolutions than
141 /// Medium; on GPU-accelerated views blur quality is equivalent to Medium.
142 ///
144};
145
146///
147/// Memory vs. performance tuning for the renderer's HTML / JavaScript
148/// engine heaps.
149///
150/// The profile governs how aggressively the library returns freed heap
151/// memory to the operating system, how it balances allocation speed
152/// against memory footprint, and how much backing-store memory the
153/// compositor keeps per View. The effect of each profile is described on
154/// the enumerator below.
155///
156/// The profile is read when the Renderer is created and again by each
157/// View at its creation; changing Config::memory_profile afterward
158/// affects only Views created later.
159///
160/// @see Config::memory_profile
161///
162enum class MemoryProfile : uint8_t {
163 ///
164 /// Sensible default. Freed memory is returned to the OS on a moderate
165 /// cadence and allocation favors speed. Recommended unless you have a
166 /// specific reason to choose otherwise.
167 ///
169
170 ///
171 /// Optimize for low memory footprint at some cost to peak throughput.
172 /// Freed memory is returned to the OS promptly, allocations are packed
173 /// more densely, and the JavaScript engine collects garbage more
174 /// eagerly. Recommended for resource-constrained targets and
175 /// long-running pages where footprint matters more than raw speed.
176 ///
178
179 ///
180 /// Optimize for peak throughput at the cost of a higher steady-state
181 /// memory footprint. Freed memory is held longer for reuse and the
182 /// JavaScript engine collects garbage less often. Recommended when
183 /// performance is paramount and the host has plenty of RAM to spare.
184 ///
186};
187
188#if UL_HAS(MEDIA)
189
190///
191/// Memory vs. performance tuning for HTML5 `<video>` and `<audio>`.
192///
193/// Pick the profile that matches your target's resource envelope; the
194/// engine will tune internal media-pipeline sizing accordingly. The
195/// effect of each profile is described on the enumerator below.
196///
197/// The profile is read once when each media element starts loading.
198/// Changing Config::media_profile after a `<video>` or `<audio>` element
199/// is already loading does not affect that element; subsequent elements
200/// will pick up the new profile.
201///
202/// @see Config::media_profile
203///
204/// @note The library plays WebM files (`video/webm` and `audio/webm`) with VP9 video and Opus
205/// audio. Other containers and codecs aren't supported.
206///
207enum class MediaProfile : uint8_t {
208 ///
209 /// Sensible default. Smooth playback and responsive seeking with
210 /// bounded memory growth as more media elements load. Recommended
211 /// starting point unless you have a specific reason to choose
212 /// otherwise.
213 ///
215
216 ///
217 /// Optimise for low memory footprint at the cost of some smoothness
218 /// and seek responsiveness. Recommended for resource-constrained
219 /// targets and for long-running pages that may host many media
220 /// elements simultaneously.
221 ///
223
224 ///
225 /// Optimise for the smoothest playback and snappiest seeking, at the
226 /// cost of higher peak memory per media element. Recommended when
227 /// playback quality is paramount and the host has plenty of RAM to
228 /// spare.
229 ///
231};
232
233#endif // UL_HAS(MEDIA)
234
235///
236/// Diagnostics and logging options.
237///
238/// @see Config::diagnostics
239///
241 ///
242 /// Whether or not the library runs in developer mode.
243 ///
244 /// Developer mode turns the DiagnosticsLevel::Auto levels below into DiagnosticsLevel::Warn,
245 /// and lets the diagnostics environment variables (`UL_JS_DIAGNOSTICS`, `UL_DOM_DIAGNOSTICS`)
246 /// override them. You should turn it on in your development builds and leave it off in the
247 /// builds you ship (a release library ignores those variables when developer mode is off, so a
248 /// shipped app's behavior can't be changed from its environment). Each variable takes `off`,
249 /// `warn`, or `strict`.
250 ///
251 bool developer_mode = false;
252
253 ///
254 /// The diagnostics level for JavaScript APIs that leave their own level at
255 /// DiagnosticsLevel::Auto.
256 ///
258
259 ///
260 /// The diagnostics level for the DOM API and data bindings.
261 ///
263
264 ///
265 /// The least severe level the library sends to the Logger (less severe messages are dropped).
266 ///
267 /// Diagnostics warnings are sent at LogLevel::Warning, so a minimum of LogLevel::Error or
268 /// LogLevel::Fatal hides them.
269 ///
271};
272
273///
274/// Core configuration for the renderer.
275///
276/// These are various configuration options that can be used to customize the behavior of the
277/// library. These options can only be set once before creating the Renderer.
278///
279/// ## Setting the Config
280///
281/// You should create an instance of the Config struct, set its members, and then call
282/// Platform::set_config() before creating the Renderer at the beginning of your
283/// application's lifetime.
284///
285/// @par Example usage
286/// ```
287/// Config config;
288/// config.user_stylesheet = "body { background: purple; }";
289///
290/// Platform::instance().set_config(config);
291/// // (Setup other Platform interfaces here.)
292///
293/// auto renderer = Renderer::Create();
294/// ```
295///
297 ///
298 /// A writable OS file path to store persistent Session data in.
299 ///
300 /// This data may include cookies, cached network resources, indexed DB, etc.
301 ///
302 /// @note Files are only written to the path when using a persistent Session.
303 ///
304 /// @see Renderer::CreateSession()
305 ///
307
308 ///
309 /// The relative path to the resources folder (loaded via the FileSystem API).
310 ///
311 /// The library loads certain resources (SSL certs, ICU data, etc.) from the FileSystem API
312 /// during runtime (eg, `file:///resources/cacert.pem`).
313 ///
314 /// You can customize the relative file path to the resources folder by modifying this setting.
315 ///
316 /// @see FileSystem
317 ///
319
320 ///
321 /// The winding order for front-facing triangles.
322 ///
323 /// @pre Only used when GPU rendering is enabled for the View.
324 ///
325 /// @see FaceWinding
326 ///
328
329 ///
330 /// The hinting algorithm to use when rendering fonts.
331 ///
332 /// Leave this at FontHinting::Normal to use the hinting from font_profile. Any other value
333 /// pins the hinting and overrides the profile.
334 ///
335 /// @see FontHinting
336 ///
338
339 ///
340 /// The font-appearance preset providing default values for the text rendering knobs below
341 /// (font_blend_mode, font_gamma, font_contrast, font_stem_darkening, font_embolden). Knobs you
342 /// set explicitly override the preset's values, so you can start from a preset and adjust
343 /// individual aspects.
344 ///
345 /// (Default: FontProfile::Default)
346 ///
348
349 ///
350 /// How antialiased glyph edges are blended into the page.
351 ///
352 /// Set to FontBlendMode::Profile to use the value from font_profile.
353 ///
355
356 ///
357 /// The gamma to use when compositing font glyphs. Lower values render text heavier, higher
358 /// values render it lighter with more edge contrast (Adobe and Apple prefer 1.8).
359 ///
360 /// Set to 0 to use the value from font_profile.
361 ///
362 /// (Default: 0, meaning the profile's value; the Default profile uses 2.2)
363 ///
364 double font_gamma = 0.0;
365
366 ///
367 /// Additional contrast enhancement applied when compositing font glyphs. Values above 0
368 /// thicken the midtones of antialiased glyph edges, increasing apparent text weight at every
369 /// size. The useful range is 0.0 (none) to about 1.0.
370 ///
371 /// Set below 0 to use the value from font_profile.
372 ///
373 /// (Default: -1.0, meaning the profile's value; the Default profile uses 0.3)
374 ///
375 double font_contrast = -1.0;
376
377 ///
378 /// Stem-darkening strength for rendered text. Boosts the coverage of antialiased glyph
379 /// pixels so thin stems keep their apparent weight on light backgrounds; each preset shapes
380 /// how the boost varies with glyph size. Text on dark backgrounds is unaffected.
381 ///
382 /// Set below 0 to use the value from font_profile.
383 ///
384 /// (Default: -1.0, meaning the profile's value)
385 ///
386 double font_stem_darkening = -1.0;
387
388 ///
389 /// Extra stroke weight applied to glyph shapes, as a fraction of the font size (eg, 0.01 widens
390 /// stems by roughly 1% of the em). Applies at every size and on both light and dark backgrounds;
391 /// glyph advances and layout are unaffected.
392 ///
393 /// Set below 0 to use the value from font_profile.
394 ///
395 /// (Default: -1.0, meaning the profile's value)
396 ///
397 double font_embolden = -1.0;
398
399 ///
400 /// Global user-defined CSS string (included before any CSS on the page).
401 ///
402 /// You can use this to override default styles for various elements on the page.
403 ///
404 /// @note This is an actual string of CSS, not a file path.
405 ///
407
408 ///
409 /// Whether or not to continuously repaint any Views, regardless if they are dirty.
410 ///
411 /// This is mainly used to diagnose painting/shader issues and profile performance.
412 ///
413 bool force_repaint = false;
414
415 ///
416 /// Whether or not GPU-accelerated Views render vector content (path fills and strokes)
417 /// analytically (Photon) instead of tessellating it to triangles. Analytic rendering is
418 /// resolution-independent: edges stay crisp under any zoom or transform.
419 ///
420 /// Path rendering on CPU-rendered Views is unaffected. Disabling this also disables
421 /// `enable_photon_text`.
422 ///
423 /// (Default: true)
424 ///
425 bool enable_photon = true;
426
427 ///
428 /// Whether or not text and color emoji also render analytically when `enable_photon` is
429 /// enabled (see photon_text_min_px for the size cutoff). Ignored when `enable_photon` is
430 /// disabled.
431 ///
432 /// This selects the text appearance for both renderers: CPU-rendered Views match the
433 /// analytic look (unhinted outlines, fractional glyph placement) so output stays
434 /// near-identical across renderers.
435 ///
436 /// (Default: true)
437 ///
439
440 ///
441 /// The minimum on-screen glyph size, in pixels, at which text renders analytically when
442 /// `enable_photon_text` is enabled; smaller glyphs use the rasterized glyph atlas. Set to 0
443 /// to render all text analytically.
444 ///
445 /// (Default: 16)
446 ///
447 uint32_t photon_text_min_px = 16;
448
449 ///
450 /// Additional delay (in seconds) on top of the engine's internal page-settled detection.
451 /// (Default: 0.1)
452 ///
453 /// Increase this if you want a little more assurance that the page has fully settled
454 /// (animations finished, late-arriving network activity complete) before View::is_settled()
455 /// flips and LoadListener::OnPageSettled() fires, at the cost of additional wait time.
456 ///
457 /// @see LoadListener::OnPageSettled()
458 ///
459 double page_settle_delay = 0.1;
460
461 ///
462 /// The number of consecutive idle samples the library requires before it declares a page
463 /// settled. (Default: 5)
464 ///
465 /// Together with page_settle_tick this sets the shortest time a page can take to settle
466 /// (page_settle_cycles * page_settle_tick). Lower it to settle sooner, at the cost of
467 /// tolerance for late layout or paint.
468 ///
469 unsigned page_settle_cycles = 5;
470
471 ///
472 /// How often (in seconds) the library samples a loading page for idleness. (Default: 0.006)
473 ///
474 /// @see page_settle_cycles
475 ///
476 double page_settle_tick = 0.006;
477
478 ///
479 /// The interval (in seconds) at which the library automatically recycles internal caches and
480 /// reclaims memory.
481 ///
482 /// The library performs this lightweight recycle for you from inside `Renderer::Update()` /
483 /// `Renderer::Render()`. It is cheap enough to be invisible at typical frame rates, and letting
484 /// the library drive it on this timer is the recommended approach.
485 ///
486 /// Set to `0` to disable the automatic recycler entirely, for applications that prefer to call
487 /// `Renderer::Recycle()` on their own schedule.
488 ///
489 /// (Default: 0.5)
490 ///
491 double recycle_delay = 0.5;
492
493 ///
494 /// Whether the library automatically collects garbage and returns freed
495 /// memory to the OS without embedder involvement.
496 ///
497 /// When a page builds up a large JavaScript heap and then goes quiet, that
498 /// memory would otherwise stay resident until the next burst of activity or
499 /// an explicit Renderer::Recycle / Renderer::PurgeMemory. With this enabled,
500 /// the library collects on its own and pushes the freed memory back to the
501 /// OS, so the process footprint drifts back down after heavy content:
502 ///
503 /// - While the application is idle (no user input, little render activity),
504 /// collection runs on a paced schedule without blocking the render thread.
505 /// - While the application is busy (for example a game rendering every
506 /// frame), collection still runs concurrently whenever the heap has grown
507 /// well past its last collected size, so a HUD that allocated heavily and
508 /// then stopped does not hold its peak footprint. How eagerly this
509 /// triggers follows `memory_profile`.
510 ///
511 /// Reclamation only happens while Renderer::Update() is being pumped. An
512 /// application that stops calling Renderer::Update() while idle gets no
513 /// automatic reclamation; call Renderer::Recycle() / Renderer::PurgeMemory()
514 /// explicitly in that case.
515 ///
516 /// Set this to false if your application manages collection itself; behavior
517 /// then matches earlier releases.
518 ///
519 /// (Default: true)
520 ///
521 bool idle_gc_enabled = true;
522
523 ///
524 /// How long (in seconds) a page must be idle, with no user input, before
525 /// automatic idle collection begins.
526 ///
527 /// Lower values reclaim sooner after the user stops interacting; higher
528 /// values wait longer before assuming the page is idle. Only used when
529 /// `idle_gc_enabled` is true.
530 ///
531 /// (Default: 2.0)
532 ///
533 double idle_gc_idle_time = 2.0;
534
535 ///
536 /// The maximum size of the library's memory cache in bytes. (Default: 256 MiB)
537 ///
538 /// @note This is used for caching decoded images, compiled JavaScript, etc. Increasing this
539 /// may improve performance for resource-heavy applications (at the cost of higher
540 /// memory usage).
541 ///
542 uint32_t memory_cache_size = 256 * 1024 * 1024;
543
544 ///
545 /// The number of pages to keep in the cache. (Default: 0, none)
546 ///
547 /// @note
548 /// \parblock
549 ///
550 /// Safari typically caches about 5 pages and maintains an on-disk cache to support typical
551 /// web-browsing activities.
552 ///
553 /// If you increase this, you should probably increase the memory cache size as well.
554 ///
555 /// \endparblock
556 ///
557 uint32_t page_cache_size = 0;
558
559 ///
560 /// Memory vs. performance tuning for the renderer's HTML / JavaScript
561 /// engine heaps. See the MemoryProfile enumerator descriptions for the
562 /// effect of each profile.
563 ///
564 /// Read when the Renderer is created and by each View at its creation. (Default: Balanced)
565 ///
567
568 ///
569 /// The system's physical RAM size in bytes.
570 ///
571 /// JavaScriptCore tries to detect the system's physical RAM size to set reasonable allocation
572 /// limits. Set this to anything other than 0 to override the detected value. Size is in bytes.
573 ///
574 /// This can be used to force JavaScriptCore to be more conservative with its allocation strategy
575 /// (at the cost of some performance).
576 ///
577 uint32_t override_ram_size = 0;
578
579 ///
580 /// The minimum size of large VM heaps in JavaScriptCore.
581 ///
582 /// Set this to a lower value to make these heaps start with a smaller initial value.
583 ///
584 /// Set to `0` (the default) to derive this value from `memory_profile`.
585 ///
587
588 ///
589 /// The minimum size of small VM heaps in JavaScriptCore.
590 ///
591 /// Set this to a lower value to make these heaps start with a smaller initial value.
592 ///
593 uint32_t min_small_heap_size = 1 * 1024 * 1024;
594
595 ///
596 /// A soft target for the total JavaScriptCore heap size, in bytes.
597 ///
598 /// This is not a hard limit: the heap may grow beyond this target. When it
599 /// does, the garbage collector treats the heap as under memory pressure and
600 /// reclaims more aggressively to bring it back toward the target.
601 ///
602 /// Set to `0` (the default) to derive this value from `memory_profile`.
603 ///
604 uint32_t max_heap_size = 0;
605
606 ///
607 /// The number of threads to use in the Renderer (for parallel painting on the CPU, etc.).
608 ///
609 /// You can set this to a certain number to limit the number of threads to spawn.
610 ///
611 /// @note
612 /// \parblock
613 ///
614 /// If this value is 0, the number of threads will be determined at runtime using the following
615 /// formula:
616 ///
617 /// ```
618 /// max(PhysicalProcessorCount() - 1, 1)
619 /// ```
620 ///
621 /// \endparblock
622 ///
624
625 ///
626 /// The max amount of time (in seconds) to allow repeating timers to run during each call to
627 /// Renderer::Update.
628 ///
629 /// The library will attempt to throttle timers if this time budget is exceeded.
630 ///
631 double max_update_time = 1.0 / 200.0;
632
633 ///
634 /// The alignment (in bytes) of the BitmapSurface when using the CPU renderer.
635 ///
636 /// The underlying bitmap associated with each BitmapSurface will have row_bytes padded to reach
637 /// this alignment.
638 ///
639 /// Aligning the bitmap helps improve performance when using the CPU renderer. Determining the
640 /// proper value to use depends on the CPU architecture and max SIMD instruction set used.
641 ///
642 /// We generally target the 128-bit SSE2 instruction set across most PC platforms so '16' is
643 /// a safe value to use.
644 ///
645 /// You can set this to '0' to perform no padding (row_bytes will always be width * 4) at a
646 /// slight cost to performance.
647 ///
648 uint32_t bitmap_alignment = 16;
649
650 ///
651 /// The quality of effects (blurs, CSS filters, SVG filters, etc.) to use when rendering.
652 ///
653 /// Applies to every rendering path (CSS element filters, canvas `ctx.filter`, and SVG filters)
654 /// on both the CPU and GPU renderers. See EffectQuality for what each level trades.
655 ///
656 /// (Default: EffectQuality::Medium)
657 ///
659
660 ///
661 /// Whether to ignore SSL certificate errors when using the curl network backend.
662 ///
663 /// When set to true, SSL certificate verification will be disabled, allowing connections
664 /// to servers with self-signed or invalid certificates. This should only be used for
665 /// development/testing purposes.
666 ///
667 /// @warning This option reduces security and should never be enabled in production.
668 ///
669 bool ignore_ssl_errors = false;
670
671 ///
672 /// Whether to validate TLS server certificates against the operating system's certificate
673 /// store instead of the certificate bundle shipped with the application
674 /// (resources/cacert.pem).
675 ///
676 /// When false (the default), HTTPS connections are verified using the bundled certificate
677 /// authority list, giving identical behavior on every platform. When true, certificates
678 /// trusted by the host operating system (including enterprise or user-installed roots) are
679 /// honored and the bundled list is not used.
680 ///
681 /// Currently honored on Windows. On platforms where the OS trust store is not yet supported,
682 /// this option is ignored and the bundled list is used.
683 ///
685
686 ///
687 /// Whether to paint full layers when dirty instead of just the dirty subregion.
688 ///
689 /// When set to true and a layer has dirty regions, the full layer will be repainted
690 /// instead of just the dirty rectangle intersection. This can be useful for debugging
691 /// rendering issues or when dirty region tracking is causing artifacts.
692 ///
693 /// @note Enabling this will impact performance as entire layers are redrawn
694 /// instead of just the changed portions.
695 ///
696 bool paint_full_layers = false;
697
698 ///
699 /// The interval (in milliseconds) at which the library samples and emits resource counters
700 /// (memory usage, VRAM, cache sizes, etc.) via the Profiler's EmitCounter() callback.
701 ///
702 /// Set to 0 to disable resource counter sampling entirely -- scopes and events are unaffected.
703 ///
704 /// Default: 500ms.
705 ///
707
708 ///
709 /// Diagnostics and logging options (developer mode, diagnostics levels, and the minimum log
710 /// level).
711 ///
712 /// @see DiagnosticsConfig
713 ///
715
716#if UL_HAS(MEDIA)
717 ///
718 /// The memory-vs-performance profile for the HTML5 media subsystem.
719 ///
720 /// Picks a tradeoff between peak memory per media element and playback
721 /// smoothness / seek responsiveness. The value is read once when each
722 /// media element starts loading and stays fixed for that element's
723 /// lifetime; later changes to `Config::media_profile` apply only to
724 /// subsequently-loaded elements.
725 ///
726 /// @see MediaProfile
727 ///
729#endif // UL_HAS(MEDIA)
730};
731
732} // namespace ultralight
733
734#pragma pop_macro("None")
#define UExport
Definition Exports.h:22
Unicode string container with conversions for UTF-8, UTF-16, and UTF-32.
Definition String.h:31
Root namespace for every public Ultralight type, function, and enumeration.
FaceWinding
The winding order for front-facing triangles.
Definition Config.h:20
@ CounterClockwise
Counter-Clockwise Winding (OpenGL, etc.).
Definition Config.h:29
@ Clockwise
Clockwise Winding (Direct3D, etc.).
Definition Config.h:24
@ Light
Always use the light look.
Definition Window.h:67
DiagnosticsLevel
How much checking and warning the library does for mistakes made through one of its APIs.
Definition DiagnosticsLevel.h:18
@ Auto
Warn when DiagnosticsConfig::developer_mode is on, Off when it's off.
Definition DiagnosticsLevel.h:39
LogLevel
The severity of a log message, from most to least severe.
Definition Logger.h:16
@ Info
Status information.
Definition Logger.h:36
FontProfile
The font-appearance preset that provides default values for the text rendering knobs (Config::font_bl...
Definition Config.h:72
@ MacOSLike
Text with the weight and sharpness of Safari and other macOS applications.
Definition Config.h:81
@ WindowsLike
Text with the crisp, moderate weight of mainstream browsers on Windows.
Definition Config.h:86
@ Default
The standard appearance– currently the same as WindowsLike.
Definition Config.h:76
@ Normal
Neither minimized nor maximized.
Definition Window.h:123
MemoryProfile
Memory vs.
Definition Config.h:162
@ LowMemory
Optimize for low memory footprint at some cost to peak throughput.
Definition Config.h:177
@ Performance
Optimize for peak throughput at the cost of a higher steady-state memory footprint.
Definition Config.h:185
@ Balanced
Sensible default.
Definition Config.h:168
EffectQuality
The quality level for rendering effects (CSS filters, shadows, blurs, etc.).
Definition Config.h:125
@ Low
Fastest effect quality.
Definition Config.h:130
@ High
Highest effect quality– favors quality over performance.
Definition Config.h:143
@ Medium
Default effect quality– strikes a good balance between quality and performance.
Definition Config.h:135
@ None
Definition Anchor.h:36
MediaProfile
Memory vs.
Definition Config.h:207
@ FavorMemory
Optimise for low memory footprint at the cost of some smoothness and seek responsiveness.
Definition Config.h:222
@ Balanced
Sensible default.
Definition Config.h:214
@ FavorPerformance
Optimise for the smoothest playback and snappiest seeking, at the cost of higher peak memory per medi...
Definition Config.h:230
FontBlendMode
How antialiased glyph edges are blended into the page.
Definition Config.h:99
@ SRGB
Blend in sRGB space– edges keep their full coverage (how macOS composites text).
Definition Config.h:114
@ GammaCorrected
Gamma-corrected blending– edges read lighter with more contrast (how browsers on Windows composite te...
Definition Config.h:109
@ Profile
Use the value from the font profile.
Definition Config.h:103
FontHinting
The font hinting algorithm to use when rendering glyphs.
Definition Config.h:37
@ Monochrome
Strongest hinting algorithm– outputs only black/white glyphs.
Definition Config.h:56
@ Normal
Let the font profile choose– Config::font_profile picks the hinting that suits its appearance,...
Definition Config.h:50
@ Smooth
Lighter hinting algorithm– glyphs are slightly fuzzier but better resemble their original shape.
Definition Config.h:43
@ Default
The platform's usual corners for this kind of window.
Definition Window.h:138
Core configuration for the renderer.
Definition Config.h:296
MediaProfile media_profile
The memory-vs-performance profile for the HTML5 media subsystem.
Definition Config.h:728
String cache_path
A writable OS file path to store persistent Session data in.
Definition Config.h:306
bool enable_photon
Whether or not GPU-accelerated Views render vector content (path fills and strokes) analytically (Pho...
Definition Config.h:425
uint32_t override_ram_size
The system's physical RAM size in bytes.
Definition Config.h:577
String user_stylesheet
Global user-defined CSS string (included before any CSS on the page).
Definition Config.h:406
double idle_gc_idle_time
How long (in seconds) a page must be idle, with no user input, before automatic idle collection begin...
Definition Config.h:533
MemoryProfile memory_profile
Memory vs.
Definition Config.h:566
bool force_repaint
Whether or not to continuously repaint any Views, regardless if they are dirty.
Definition Config.h:413
double recycle_delay
The interval (in seconds) at which the library automatically recycles internal caches and reclaims me...
Definition Config.h:491
bool ignore_ssl_errors
Whether to ignore SSL certificate errors when using the curl network backend.
Definition Config.h:669
uint32_t max_heap_size
A soft target for the total JavaScriptCore heap size, in bytes.
Definition Config.h:604
uint32_t page_cache_size
The number of pages to keep in the cache.
Definition Config.h:557
double font_stem_darkening
Stem-darkening strength for rendered text.
Definition Config.h:386
double font_embolden
Extra stroke weight applied to glyph shapes, as a fraction of the font size (eg, 0....
Definition Config.h:397
double page_settle_tick
How often (in seconds) the library samples a loading page for idleness.
Definition Config.h:476
bool use_system_certificate_store
Whether to validate TLS server certificates against the operating system's certificate store instead ...
Definition Config.h:684
bool idle_gc_enabled
Whether the library automatically collects garbage and returns freed memory to the OS without embedde...
Definition Config.h:521
bool enable_photon_text
Whether or not text and color emoji also render analytically when enable_photon is enabled (see photo...
Definition Config.h:438
uint32_t resource_sample_interval
The interval (in milliseconds) at which the library samples and emits resource counters (memory usage...
Definition Config.h:706
double font_contrast
Additional contrast enhancement applied when compositing font glyphs.
Definition Config.h:375
EffectQuality effect_quality
The quality of effects (blurs, CSS filters, SVG filters, etc.) to use when rendering.
Definition Config.h:658
uint32_t photon_text_min_px
The minimum on-screen glyph size, in pixels, at which text renders analytically when enable_photon_te...
Definition Config.h:447
bool paint_full_layers
Whether to paint full layers when dirty instead of just the dirty subregion.
Definition Config.h:696
double page_settle_delay
Additional delay (in seconds) on top of the engine's internal page-settled detection.
Definition Config.h:459
FaceWinding face_winding
The winding order for front-facing triangles.
Definition Config.h:327
double font_gamma
The gamma to use when compositing font glyphs.
Definition Config.h:364
double max_update_time
The max amount of time (in seconds) to allow repeating timers to run during each call to Renderer::Up...
Definition Config.h:631
DiagnosticsConfig diagnostics
Diagnostics and logging options (developer mode, diagnostics levels, and the minimum log level).
Definition Config.h:714
uint32_t min_large_heap_size
The minimum size of large VM heaps in JavaScriptCore.
Definition Config.h:586
FontHinting font_hinting
The hinting algorithm to use when rendering fonts.
Definition Config.h:337
uint32_t memory_cache_size
The maximum size of the library's memory cache in bytes.
Definition Config.h:542
uint32_t bitmap_alignment
The alignment (in bytes) of the BitmapSurface when using the CPU renderer.
Definition Config.h:648
uint32_t min_small_heap_size
The minimum size of small VM heaps in JavaScriptCore.
Definition Config.h:593
FontBlendMode font_blend_mode
How antialiased glyph edges are blended into the page.
Definition Config.h:354
unsigned page_settle_cycles
The number of consecutive idle samples the library requires before it declares a page settled.
Definition Config.h:469
String resource_path_prefix
The relative path to the resources folder (loaded via the FileSystem API).
Definition Config.h:318
uint32_t num_renderer_threads
The number of threads to use in the Renderer (for parallel painting on the CPU, etc....
Definition Config.h:623
FontProfile font_profile
The font-appearance preset providing default values for the text rendering knobs below (font_blend_mo...
Definition Config.h:347
Diagnostics and logging options.
Definition Config.h:240
bool developer_mode
Whether or not the library runs in developer mode.
Definition Config.h:251
DiagnosticsLevel dom
The diagnostics level for the DOM API and data bindings.
Definition Config.h:262
DiagnosticsLevel javascript
The diagnostics level for JavaScript APIs that leave their own level at DiagnosticsLevel::Auto.
Definition Config.h:257
LogLevel min_log_level
The least severe level the library sends to the Logger (less severe messages are dropped).
Definition Config.h:270