Skip to content

Instantly share code, notes, and snippets.

View ctrlcctrlv's full-sized avatar
🛠️
happy hacking

Fredrick Brennan ctrlcctrlv

🛠️
happy hacking
View GitHub Profile
@ctrlcctrlv
ctrlcctrlv / gegl_minimal_example.py
Created May 28, 2019 10:34
Minimal example of the use of the filter cell-noise with python-gegl. Should apply to most other GEGL filters.
#!/usr/bin/env python3
# Minimal example of using the filter `cell-noise` with GEGL through python-gegl.
# Hopefully I can figure out how to import this into GIMP's Python console's environment.
# These two lines makes sure version of gegl is correct
import gi
gi.require_version('Gegl', '0.4')
import gegl
import random
@ctrlcctrlv
ctrlcctrlv / ent2utf8.py
Created June 4, 2019 09:34
Command line programs for working with HTML5 character entities.
#!/usr/bin/env python3
import html
import sys
if sys.stdin.isatty():
try:
while 1:
sys.stdout.write(html.unescape(input())+'\n')
except EOFError: pass
@ctrlcctrlv
ctrlcctrlv / wifi_password_cards.tex
Created June 30, 2019 07:13
WiFi password cards made using (Xe)LaTeX
%%%%
%
% ticket.sty used to make WiFi cards, like in some hotels (or the condos of autistic crippled midgets)
%
% Based on https://tex.stackexchange.com/a/4696/81002
%
% Set your WiFi password by editing line №59
%
%%%%
@ctrlcctrlv
ctrlcctrlv / CombiningClassName.c
Created July 2, 2019 10:49
Combining class name functions
char * CombiningClassName(uint32 cc) {
const int COMBININGCLASS_COUNT = 14;
char * comb_classes[COMBININGCLASS_COUNT];
int i = 0;
if (cc & FF_UNICODE_COMBININGCLASS) {
comb_classes[i] = "COMBININGCLASS";
++i;
}
@ctrlcctrlv
ctrlcctrlv / Ấ.sfd
Created July 8, 2019 05:37
File demonstrating the minimum glyphs necessary to build Ấ (U+1EA4)
SplineFontDB: 3.0
FontName: Untitled2
FullName: Untitled2
FamilyName: Untitled2
Weight: Regular
Copyright: Copyright (c) 2019, Unknown
UComments: "2019-7-8: Created with FontForge (http://fontforge.org)"
Version: 001.000
ItalicAngle: 0
UnderlinePosition: -100
@ctrlcctrlv
ctrlcctrlv / #inkscape-devel_20190818.log
Created August 18, 2019 10:47
IRC chat log of #inkscape-devel on 18 August 2019 in re: variable font interpolation and FontForge
06:06:35 copypaste this is a stretch, but maybe someone here knows the answer to this question we have about variable font interpolation? and could comment ? https://github.com/fontforge/fontforge/issues/3803#issuecomment-522224005
06:07:01 copypaste basically we just want to know how it's done and whether inkscape's interpolator is the same method
06:08:39 Mc afaik, variable fonts are rendered by harfbuzz or pango
06:12:00 Mc http://wiki.inkscape.org/wiki/index.php/Variable_Fonts_support
06:12:19 Mc Pango >= 1.41.1; FreeType >= 2.8
06:12:35 Mc Harfbuzz >= 1.4.2
06:13:59 copypaste ok but
06:14:08 copypaste how do we implement it
06:14:12 copypaste what kind of interpolation is in use
06:15:11 copypaste we (fontforge) also use pango. are you telling me we ought to just make pango do it and not implement the interpolation in fontforge?
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
index fc8d2eed4..fceebb936 100644
--- a/src/plugins/CMakeLists.txt
+++ b/src/plugins/CMakeLists.txt
@@ -97,10 +97,15 @@ if(ENABLE_SCRIPTS AND ENABLE_PERL)
endif()
if(ENABLE_SCRIPTS AND ENABLE_PYTHON)
- find_package(Python)
- if(PYTHON_FOUND)
@ctrlcctrlv
ctrlcctrlv / PS.glsl
Created January 2, 2020 13:31
TT2020 Style O1 (For use with SHADERed)
#version 400
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable
in vec4 coord;
out vec4 outColor;
uniform vec2 iResolution;
@ctrlcctrlv
ctrlcctrlv / rust-maintainer-perfectionism.md
Last active November 16, 2025 08:09
Rust maintainer perfectionism

Rust maintainer perfectionism, or, the tragedy of Alacritty

I did not submit this to Hacker News and did not intend that this post would have high circulation but have no real problem with it being there or with it having such. I have more recent comments below. This post is from January 2020 and predates the Modular Font Editor K (MFEK) project.

I have not worked on Rust projects in quite a while, and don't know if I ever will again. I feel many crate maintainers are way too perfectionist, for example, despite all the developer hours that went into this PR, it took the effort within years to be (halfway) merged.

There's always a reason not to merge, isn't there? It would be better done with a new nightly language feature, or the function signature should have a where clause, or the documentation is not perfect. There's always a new nit to pick in the world of Ru

@ctrlcctrlv
ctrlcctrlv / GuessAnchors.py
Last active February 14, 2020 11:32
Guess Anchors for glyphs in FontForge (rough draft)
import fontforge
import re
from functools import partial
# Only a list so we can change the contents of its elements at runtime. Don't change its length at runtime.
AnchorLocations = [
"Above",
"Below",
"Overstrike",
"Right",