Created
May 7, 2022 18:46
-
-
Save Mathnerd314/39e5cac86adfdb7b1c244b3049409256 to your computer and use it in GitHub Desktop.
Discord noto font test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ./make-test-python.nix ({ pkgs, lib, ... }: { | |
name = "noto-fonts"; | |
meta = { | |
maintainers = with lib.maintainers; [ nickcao midchildan ]; | |
}; | |
nodes.machine = { | |
imports = [ ./common/user-account.nix ./common/x11.nix ]; | |
environment.systemPackages = [ pkgs.discord ]; | |
environment.variables."XAUTHORITY" = "/home/alice/.Xauthority"; | |
virtualisation.memorySize = 2047; | |
test-support.displayManager.auto.user = user; | |
fonts = { | |
enableDefaultFonts = false; | |
fonts = with pkgs;[ | |
noto-fonts | |
noto-fonts-cjk-sans | |
noto-fonts-cjk-serif | |
noto-fonts-emoji | |
]; | |
fontconfig.defaultFonts = { | |
serif = [ "Noto Serif" "Noto Serif CJK SC" ]; | |
sansSerif = [ "Noto Sans" "Noto Sans CJK SC" ]; | |
monospace = [ "Noto Sans Mono" "Noto Sans Mono CJK SC" ]; | |
emoji = [ "Noto Color Emoji" ]; | |
}; | |
}; | |
}; | |
testScript = | |
# extracted from http://www.clagnut.com/blog/2380/ | |
# emoji are from Unicode 14 (latest standard) | |
let testText = builtins.toFile "test.txt" '' | |
the quick brown fox jumps over the lazy dog | |
視野無限廣,窗外有藍天 | |
Eĥoŝanĝo ĉiuĵaŭde. | |
いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす | |
다람쥐 헌 쳇바퀴에 타고파 | |
中国智造,慧及全球 | |
🫠🫣🫱🏻🫲🏿 | |
''; in | |
'' | |
import shlex | |
# Run as user alice | |
def ru(cmd): | |
return "su - alice -c " + shlex.quote(cmd) | |
machine.wait_for_x() | |
machine.succeed(ru("ulimit -c unlimited; discord >&2 & disown")) | |
# wait and log in to discord, check test text sent from an alt | |
''; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment