Skip to content

Brisk v0.9.7

Choose a tag to compare

@github-actions github-actions released this 27 Feb 22:42

Bug fixes for the 0.9.6 release:

  • Updated ICU data loading code to resolve issues on macOS ARM64.
  • Fixed a WebGPU memory leak.
  • Ensured the D3D11 render context is flushed after every batch.
  • Increased the minimum required CMake version to 3.22.
  • Fixed imageResize.

❗ indicates a breaking change.

Added

  • Added support for SVG fonts🖋️💻.
  • Added support for color emojis🔤😊.
  • Resource bundling has been rewritten from scratch. Apps can now override Brisk resources, such as supplying their own fonts.
  • Support for viewport-relative units (vw/vh/vmax/vmin)
  • ❗ Buffered GUI mode has been introduced. The GUI is rendered to an offscreen texture, tracking the updated rectangles each frame. The texture is then blitted to the screen, significantly improving performance in cases where GUI updates are infrequent. This mode can be switched off for a specific window or globally.
  • Lucide icons have been updated to latest version.
  • Ability to override ItemList visible property.
  • WidgetTree can now be used without a GUIWindow and InputQueue.
  • New algorithm for shadow rendering by Evan Wallace.
  • A new ColorW type has been introduced, capable of storing extended-range sRGB values in a compact form.
  • storeWidget function to store the weak pointer to the widget to an external variable during tree building.
  • string_view versions of the trim, ltrim and rtrim functions.
  • BRISK_ASSUME macro that maps to __builtin_assume on supported compilers.
  • SVGImage::renderTo to render to an existing Image.
  • Resources are now packed into a binary using the .incbin assembly instruction on supported compilers for improved performance.
  • HTML SAX parser added.
  • Very basic HTML support in the Text widget via textOption = TextOptions::HTML.
  • Stateless functions in Canvas class.
  • Added the ability to select the internationalization implementation: basic or ICU-based. Apps can now choose the implementation without rebuilding the Brisk binaries.
  • Visual tests for widgets.

Changed

  • ❗ A new implementation of widget clipping has been introduced. Widget painting can now be clipped to the parent's bounds, the parent's clip rectangle, or the widget's own bounds.
  • DialogComponent::result is now a Property instead of a plain field.
    Use result.get() to retrieve the boolean value or rely on implicit conversion.
    The same applies to the value, prompt, text, and icon fields in derived dialogs.
  • buttonColor has been renamed to mainColor.
  • ❗ The layoutOptions property of the Text widget has been renamed to textOptions, and the LayoutOptions type is now TextOptions.
  • ❗ The createWindow function should now be overridden instead of makeWindow to use a custom window class for the component.
  • ❗ A new isHintVisible property controls whether the widget's hint is visible.
  • ❗ The description property has been removed in favor of the hint property.
  • ❗ New font size default (12 pixels).
  • ❗ The reflection static field is now used to store field information (previously Reflection).
  • ❗ Style variables (e.g., selectedColor) are now indexed by string hash instead of a linear index, making it easier to create custom variables.
  • ComboBox and PopupBox mouse interaction fixes.
  • ImplicitContext is now convertible to bool.
  • The descender value of Lucide icons has been adjusted to improve their alignment within text.
  • The Knob and Slider colors can be changed by assigning the selectedColor style variable. Hover and pressed styles are preserved.
  • Showcase app updated.
  • The ReflectionOf utility class has been introduced to provide reflection information for external types.
  • ❗ Shell-related functions moved to the Shell class: Shell::showMessage, Shell::openURLInBrowser, Shell::showDialog, etc.
  • ❗ Clipboard-related functions moved to the Clipboard class: Resources::getText, etc.
  • ❗ Resource-related functions moved to the Resources class: Resources::load, etc.
  • InplacePtr and PossiblyShared types are removed.
  • uiThread has been renamed to uiScheduler to match mainScheduler.
  • std::optional and std::nullopt are no more included in Brisk namespaces. Use full qualified names instead.
  • ❗ File IO functions now use uint64_t instead of uintmax_t.
  • ❗ Several renames have been made to ensure style consistency (bytesBytes, bytes_viewBytesView).
  • Bytes, BytesView, and other related types now use std::byte instead of uint8_t.
  • ❗ The lifetime of BindingObject is now accessed via the lifetime function. Replace occurrences of m_lifetime with lifetime() in your code.
  • ❗ Font name constants moved to the Font class: Fonts::MonospaceFont::Monospace.
  • Documentation files have been updated.
  • ❗ Fonts are now set by their names, not IDs. Examples: fontFamily = "Lato", Font{"Noto", 16}.
  • Performance optimizations.
  • New WrapAnywhere flag in TextOptions.
  • ❗ Aliases to std types removed.

Fixed

  • Numerous fixes and improvements.
  • BRISK_SCRIPTS_DIR is now cached in CMakeCache.txt, resolving issues when Brisk is included using add_subdirectory.
  • Rectangle::empty has been fixed to return true for {INT_MAX, INT_MAX, INT_MIN, INT_MIN}.
  • BackStrikedText now uses opacity for painting.
  • Fixed contrast ratio calculation, ensuring that light text color is preferred on certain backgrounds.
  • findIntegralType fixes.
  • Brisk now supports spaces around commas in the font list ("Lato, Noto").