Enhance CMake configuration and improve string safety in source files
- Updated CMakeLists.txt to silence C++23 deprecation warnings and added definitions for intrinsic int128 support. - Modified GitHub Actions workflow to handle missing asset directories gracefully and ensure correct versioning in Info.plist. - Refactored string handling in multiple source files to use std::memcpy for safer string copying, preventing potential buffer overflows. - Improved font loading logic and ensured consistent handling of theme properties in the editor.
This commit is contained in:
@@ -3,6 +3,11 @@
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cstring>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#
|
||||
|
||||
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
@@ -98,11 +103,11 @@ absl::Status LoadPackageFonts() {
|
||||
if (font_registry.fonts.empty()) {
|
||||
// Initialize the font names and sizes
|
||||
font_registry.fonts = {
|
||||
{KARLA_REGULAR, FONT_SIZE_DEFAULT},
|
||||
{ROBOTO_MEDIUM, FONT_SIZE_DEFAULT},
|
||||
{COUSINE_REGULAR, FONT_SIZE_DEFAULT},
|
||||
{IBM_PLEX_JP, FONT_SIZE_DEFAULT},
|
||||
{DROID_SANS, FONT_SIZE_DROID_SANS},
|
||||
FontConfig{KARLA_REGULAR, FONT_SIZE_DEFAULT},
|
||||
FontConfig{ROBOTO_MEDIUM, FONT_SIZE_DEFAULT},
|
||||
FontConfig{COUSINE_REGULAR, FONT_SIZE_DEFAULT},
|
||||
FontConfig{IBM_PLEX_JP, FONT_SIZE_DEFAULT},
|
||||
FontConfig{DROID_SANS, FONT_SIZE_DROID_SANS},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user