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 / manage_guidelines.py
Created June 9, 2020 03:25
FontForge "Community guidelines" authoring script
#!/usr/bin/python3
# This program outputs the "Link to this section" links, and also a table of
# contents for the "Community guidelines" wiki FontForge page.
#
# Warning: pretty hacky...
#
# Original author: Fredrick R. Brennan
# License: FontForge original BSD license
#
# Run as e.g.:
@ctrlcctrlv
ctrlcctrlv /
Created February 18, 2020 13:17
Debug info for a 公 in a certain vexatious Chinese font
FT_Render_Glyph: bitmap 32x30, gray 8-bit bitmap (mode 2)
Total coverage: 42196
MD5 checksum: 701AB01ABA4457D4D895C26B1C4FC418
Netpbm image: start
P2 32 30 255
0 0 0 0 0 0 0 0 0 0 0 0 0 26 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 229 249 187 62 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 54 164 241 252 81 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16 179 237 22 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 220 167 0 0 0 0 0 0 0 0 0 0 0 0 0
@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",
@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 / 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;
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 / #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?
@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 / 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 / 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
%
%%%%