Skip to content

Instantly share code, notes, and snippets.

@marguerite
marguerite / skia_fontconfig.patch
Created February 18, 2025 13:00
Marguerite's skia fontconfig patch
diff -urN ports.orig/SkFontConfigInterface_direct.cpp ports/SkFontConfigInterface_direct.cpp
--- ports.orig/SkFontConfigInterface_direct.cpp 2025-02-18 20:51:46.586862156 +0800
+++ ports/SkFontConfigInterface_direct.cpp 2025-02-18 20:51:43.910244016 +0800
@@ -588,6 +588,68 @@
return match;
}
+FcPattern* SkFontConfigInterfaceDirect::getFontPattern(FcConfig* config, const char* family_name, int weight) {
+ FcFontSet* system = FcConfigGetFonts(config, FcSetSystem);
+ if (system) {
@marguerite
marguerite / blink_font_stack_debug.patch
Created February 15, 2025 03:07
marguerite's blink_font_stack_debug patch
@marguerite
marguerite / gist:940e9ee09c31bdef858ecae6d180d4d9
Created March 13, 2024 10:48
generate dependencies for wechat-uos-beta under openSUSE TW
import os
import stat
import subprocess
def find(d, a, b):
for f in os.listdir(d):
f = os.path.join(d, f)
if os.path.isdir(f):
find(f, a, b)
elif os.path.isfile(f):
# fc-emoji-subtract copyright [email protected]
# description: it calculates the charset of emoji fonts installed on your system and find what need to subtract for you specified font
diff --git a/Makefile.am b/Makefile.am
index 6d4cd32..70c61a0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,7 +22,7 @@
# PERFORMANCE OF THIS SOFTWARE.
SUBDIRS=fontconfig fc-case fc-lang src \
#include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "unicode/ucol.h"
@marguerite
marguerite / plasma5-change-wallpaper.js
Created November 8, 2020 07:44
Plasma 5 Desktop Scripting: Change Wallpaper in InteractiveConsole
for (i in activities()) {
activityID = activities()[i];
desktops = desktopsForActivity(activityID)
for (j in desktops) {
desktop = desktops[j];
desktop.wallpaperPlugin = "org.kde.image";
desktop.wallpaperMode = "Scaled and Cropped";
desktop.currentConfigGroup = new Array("Wallpaper", "org.kde.image", "General");
desktop.writeConfig("Image", "file:///home/zhou/Pictures/Bing/AlpineLarches_ZH-CN10557456981_1920x1200.jpg");
}