Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/scripts/linux/appimage-qt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ STRIP=strip

declare -a MANUAL_LIBS=(
"libshaderc_shared.so.1"
"libharfbuzz.so.0"
"libfreetype.so.6"
)

set -e
Expand Down
37 changes: 1 addition & 36 deletions .github/workflows/scripts/linux/build-dependencies-qt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ QT=6.11.0
QTAPNG=1.3.0

FFMPEG=8.0
FREETYPE=2.14.1
HARFBUZZ=13.0.0
LIBBACKTRACE=ad106d5fdd5d960bd33fae1c48a351af567fd075
LIBJPEGTURBO=3.1.3
LIBPNG=1.6.55
Expand Down Expand Up @@ -57,8 +55,6 @@ e710e6e760f92922b86e4dd68f6bbe94ef6510919519d1b0068e874b5ad84d37 qtwayland-ever
f1d3be3489f758efe1a8f12118a212febbe611aa670af32e0159fa3c1feab2a6 QtApng-$QTAPNG.tar.gz

b2751fccb6cc4c77708113cd78b561059b6fa904b24162fa0be2d60273d27b8e ffmpeg-$FFMPEG.tar.xz
32427e8c471ac095853212a37aef816c60b42052d4d9e48230bab3bdf2936ccc freetype-$FREETYPE.tar.xz
207f96964dc9475b13c1f66565bf145d2658089d65b4cf786d351da2857fc269 harfbuzz-$HARFBUZZ.tar.gz
96e5c2d7f2c482a60d5804da48a2eb9a0db0719b2c65dcc169fbfdcf37f3a45d libbacktrace-$LIBBACKTRACE.tar.gz
075920b826834ac4ddf97661cc73491047855859affd671d52079c6867c1c6c0 libjpeg-turbo-$LIBJPEGTURBO.tar.gz
d925722864837ad5ae2a82070d4b2e0603dc72af44bd457c3962298258b8e82d libpng-$LIBPNG.tar.xz
Expand All @@ -81,8 +77,6 @@ EOF

if ! shasum -sa 256 --check SHASUMS 2> /dev/null; then
curl -L \
-O "https://sourceforge.net/projects/freetype/files/freetype2/$FREETYPE/freetype-$FREETYPE.tar.xz" \
-O "https://github.com/harfbuzz/harfbuzz/archive/$HARFBUZZ/harfbuzz-$HARFBUZZ.tar.gz" \
-O "https://github.com/ianlancetaylor/libbacktrace/archive/$LIBBACKTRACE/libbacktrace-$LIBBACKTRACE.tar.gz" \
-O "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$LIBJPEGTURBO/libjpeg-turbo-$LIBJPEGTURBO.tar.gz" \
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$LIBPNG/libpng-$LIBPNG.tar.xz" \
Expand Down Expand Up @@ -203,35 +197,6 @@ cmake --build build --parallel
ninja -C build install
cd ..

echo "Building FreeType without HarfBuzz..."
rm -fr "freetype-$FREETYPE"
tar xf "freetype-$FREETYPE.tar.xz"
cd "freetype-$FREETYPE"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=ON -DFT_REQUIRE_PNG=ON -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_DISABLE_HARFBUZZ=TRUE -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..

echo "Building HarfBuzz..."
rm -fr "harfbuzz-$HARFBUZZ"
tar xf "harfbuzz-$HARFBUZZ.tar.gz"
cd "harfbuzz-$HARFBUZZ"
# Add an SOVERSION to match system harfbuzz
sed -i 's/PROPERTIES VISIBILITY_INLINES_HIDDEN TRUE)/PROPERTIES VISIBILITY_INLINES_HIDDEN TRUE SOVERSION 0)/g' CMakeLists.txt
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DHB_BUILD_UTILS=OFF -DHB_HAVE_FREETYPE=ON -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..

echo "Building FreeType with HarfBuzz..."
rm -fr "freetype-$FREETYPE"
tar xf "freetype-$FREETYPE.tar.xz"
cd "freetype-$FREETYPE"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DFT_REQUIRE_ZLIB=ON -DFT_REQUIRE_PNG=ON -DFT_DISABLE_BZIP2=TRUE -DFT_DISABLE_BROTLI=TRUE -DFT_REQUIRE_HARFBUZZ=TRUE -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..

echo "Building SDL..."
rm -fr "$SDL"
tar xf "$SDL.tar.gz"
Expand Down Expand Up @@ -344,7 +309,7 @@ echo "Building PlutoSVG..."
rm -fr "plutosvg-$PLUTOSVG"
tar xf "plutosvg-$PLUTOSVG.tar.gz"
cd "plutosvg-$PLUTOSVG"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DPLUTOSVG_ENABLE_FREETYPE=ON -DPLUTOSVG_BUILD_EXAMPLES=OFF -B build -G Ninja
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DBUILD_SHARED_LIBS=ON -DPLUTOSVG_ENABLE_FREETYPE=OFF -DPLUTOSVG_BUILD_EXAMPLES=OFF -B build -G Ninja
cmake --build build --parallel
ninja -C build install
cd ..
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/windows_build_qt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ jobs:
shell: pwsh
run: |
[string[]] $clang_cl = &clang-cl.exe --version

$version = [Regex]::Match($clang_cl[0], "(\d+\.\d+\.\d+)")
$path = $clang_cl[3].TrimStart("InstalledDir: ").TrimEnd("\bin")

$output = @"
<Project>
<PropertyGroup>
Expand All @@ -75,9 +75,9 @@ jobs:
</PropertyGroup>
</Project>
"@

Write-Host $output

$output | Out-File Directory.build.props

# actions/checkout elides tags, fetch them primarily for releases
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
msbuild "PCSX2_qt.sln" /m /v:m /p:Configuration="${{ inputs.configuration }}" /p:Platform="${{ inputs.platform }}"
)
REM We can use Segoe UI Emoji so we don't need to bundle this
del bin\resources\fonts\NotoColorEmoji*
del bin\resources\fonts\Twemoji*

- name: Run Tests
if: inputs.configuration == 'CMake'
Expand Down Expand Up @@ -186,9 +186,9 @@ jobs:
shell: pwsh
run: |
mkdir -Force symbols
Get-ChildItem -Path ./bin -Recurse -File | Where-Object {
($_.Extension -eq ".exe" -or $_.Extension -eq ".pdb") -and ($_.Name -notmatch "updater")
} | ForEach-Object {
Get-ChildItem -Path ./bin -Recurse -File | Where-Object {
($_.Extension -eq ".exe" -or $_.Extension -eq ".pdb") -and ($_.Name -notmatch "updater")
} | ForEach-Object {
& dump_syms $_.FullName >> symbols/pcsx2-qt.bpsym
}
Get-ChildItem -Path ./bin -Recurse -Filter "*.pdb" | ForEach-Object {
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/imgui/include/imconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
// - plutosvg is currently easier to install, as e.g. it is part of vcpkg. It will support more fonts and may load them faster. See misc/freetype/README for instructions.
// - Both require headers to be available in the include path + program to be linked with the library code (not provided).
// - (note: lunasvg implementation is based on Freetype's rsvg-port.c which is licensed under CeCILL-C Free Software License Agreement)
#define IMGUI_ENABLE_FREETYPE_PLUTOSVG
//#define IMGUI_ENABLE_FREETYPE_PLUTOSVG
//#define IMGUI_ENABLE_FREETYPE_LUNASVG

//---- Use stb_truetype to build and rasterize the font atlas (default)
Expand Down
93 changes: 0 additions & 93 deletions bin/resources/fonts/NotoColorEmoji-Regular-license

This file was deleted.

Binary file removed bin/resources/fonts/NotoColorEmoji-Regular.ttf
Binary file not shown.
50 changes: 50 additions & 0 deletions bin/resources/fonts/Twemoji.Mozilla-license
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
## License for the Code

Copyright 2016-2018, Mozilla Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.



## License for the Visual Design

The Emoji art in the twe-svg.zip archive comes from [Twemoji](https://twitter.github.io/twemoji),
and is used and redistributed under the CC-BY-4.0 [license terms](https://github.com/twitter/twemoji#license)
offered by the Twemoji project.

### Creative Commons Attribution 4.0 International (CC BY 4.0)
https://creativecommons.org/licenses/by/4.0/legalcode
or for the human readable summary: https://creativecommons.org/licenses/by/4.0/


#### You are free to:
**Share** — copy and redistribute the material in any medium or format

**Adapt** — remix, transform, and build upon the material for any purpose, even commercially.

The licensor cannot revoke these freedoms as long as you follow the license terms.


#### Under the following terms:
**Attribution** — You must give appropriate credit, provide a link to the license,
and indicate if changes were made.
You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

**No additional restrictions** — You may not apply legal terms or **technological measures**
that legally restrict others from doing anything the license permits.

#### Notices:
You do not have to comply with the license for elements of the material in the public domain
or where your use is permitted by an applicable exception or limitation. No warranties are given.
The license may not give you all of the permissions necessary for your intended use.
For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.
Binary file added bin/resources/fonts/Twemoji.Mozilla.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion cmake/SearchForStuff.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ find_package(Zstd 1.5.5 REQUIRED)
find_package(LZ4 REQUIRED)
find_package(WebP REQUIRED) # v1.3.2, spews an error on Linux because no pkg-config.
find_package(SDL3 3.2.6 REQUIRED)
find_package(Freetype 2.12 REQUIRED)
find_package(Freetype 2.10 REQUIRED) # 2.10 is the first with COLRv0 support, which we need for rendering emoji
find_package(plutovg 1.1.0 REQUIRED)
find_package(plutosvg 0.0.7 REQUIRED)

Expand Down
29 changes: 4 additions & 25 deletions pcsx2-qt/Translations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,11 @@ namespace FontNames
{nullptr, "Noto Sans Devanagari"},
};
static constexpr FontLoadInfo Emoji[] = {
{"NotoColorEmoji-Regular.ttf"},
{"Twemoji.Mozilla.ttf"},
{"Seguiemj.ttf"},
// {nullptr, "Apple Color Emoji"}, // Freetype can't properly render Apple Color Emoji.
{nullptr, "Noto Color Emoji"},
{nullptr, "Twemoji Mozilla"},
// {nullptr, "Noto Color Emoji"}, // Noto Color Emoji comes in bitmap, SVG, and COLRv1 variants, none of which are supported
{nullptr, "Noto Emoji"},
};
static constexpr FontLoadInfo Hebrew[] = {
Expand Down Expand Up @@ -473,29 +474,7 @@ static std::span<const u8> TryLoadFont(FontSearchContext* ctx, const FontLoadInf

static bool ValidateFont(const FontLoadInfo& info, std::span<const u8> data)
{
if (info.face_name && 0 == strcmp(info.face_name, "Noto Color Emoji"))
{
// Noto Color Emoji comes in bitmap, SVG, and COLRv1 variants.
// We can only render the SVG variant.
if (data.size() < 8)
return false;
u32 magic_be;
u16 num_tables_be;
memcpy(&magic_be, &data[0], sizeof(u32));
memcpy(&num_tables_be, &data[4], sizeof(u16));
if (qFromBigEndian(magic_be) != 0x10000)
return false;
size_t num_tables = qFromBigEndian(num_tables_be);
if (data.size() < num_tables * 16 + 12)
return false;
for (size_t i = 0; i < num_tables; i++)
{
// Check if there's an "SVG " table
if (0 == memcmp(&data[i * 16 + 12], "SVG ", 4))
return true;
}
return false;
}
// We currently don't search for any fonts that might have unsupported versions installed on some OSes
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion pcsx2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ function(setup_main_executable target)
if (NOT WIN32 AND "${path}" MATCHES "/dx11/") # Don't include unneccessary stuff
continue()
endif()
if (NOT BUNDLE_EMOJI_FONT AND "${path}" MATCHES "fonts/NotoColorEmoji")
if (NOT BUNDLE_EMOJI_FONT AND "${path}" MATCHES "fonts/Twemoji")
continue()
endif()
pcsx2_resource(${target} ${path} ${CMAKE_SOURCE_DIR}/bin/resources/)
Expand Down
Loading