Skip to content

Instantly share code, notes, and snippets.

@chrissimpkins
chrissimpkins / check-alwayspass.py
Last active Aug 14, 2020
Fontbakery always pass custom profile for testing
View check-alwayspass.py
# Copyright 2020 Christopher Simpkins
# 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,
@chrissimpkins
chrissimpkins / bracket-layer-edit.py
Created Jun 23, 2020
Modify glyphs source file bracket layer size
View bracket-layer-edit.py
# Copyright 2020 Christopher Simpkins
# 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,
View lang-coverage.yml
name: Script + Writing System Coverage
on: [push, pull_request]
jobs:
cldr-coverage-support:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
@chrissimpkins
chrissimpkins / commentvisitor.rs
Last active Mar 5, 2020
Approach for removal of comments with syn crate
View commentvisitor.rs
struct CommentRemove;
impl VisitMut for CommentRemove {
fn visit_attribute_mut(&mut self, node: &mut Attribute) {
// identify comments
if node.path.is_ident("doc") {
println!("{:?}", node.tokens);
println!("{:?}", node.path);
// can you "null" out the Attribute in some way so that the comments are removed when you transform back into Rust text source?
// or is there a different approach?
@chrissimpkins
chrissimpkins / rustc-guide-references.md
Created Mar 3, 2020
rustc-guide references in rust-lang/rust repository
View rustc-guide-references.md

Output from rg "rustc-guide":

rustfmt.toml
23:    "src/doc/rustc-guide",

triagebot.toml
20:[instructions]: https://rust-lang.github.io/rustc-guide/ice-breaker/llvm.html
31:[instructions]: https://rust-lang.github.io/rustc-guide/ice-breaker/cleanup-crew.html
@chrissimpkins
chrissimpkins / build.sh
Last active Jan 30, 2020
Build Noto Nastaliq Urdu with fontmake
View build.sh
fontmake -g NotoNastaliqUrdu.glyphs -o otf ttf --mti-source NotoNastaliqUrdu.plist --no-production-names
@chrissimpkins
chrissimpkins / TrueColour.md
Created Jan 16, 2020 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals
View TrueColour.md

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
@chrissimpkins
chrissimpkins / ast2text.py
Created Jan 14, 2020 — forked from kylehowells/ast2text.py
Extract the plain text from markdown, for plain text search.
View ast2text.py
import commonmark
with open('test.md', 'r') as myfile:
text = myfile.read()
parser = commonmark.Parser()
ast = parser.parse(text)
# Returns the text from markdown, stripped of the markdown syntax itself
def ast2text(astNode):
@chrissimpkins
chrissimpkins / font_cldr_locales.py
Created Jan 12, 2020 — forked from moyogo/font_cldr_locales.py
Check language CLDR locales supported by a font
View font_cldr_locales.py
'''
Requires pyicu, fontTools
Authors:
Denis Moyogo Jacquerye [https://github.com/moyogo]
MIT License [https://opensource.org/licenses/MIT]
'''
import sys
import icu
View keybase.md

Keybase proof

I hereby claim:

  • I am chrissimpkins on github.
  • I am csimpkins (https://keybase.io/csimpkins) on keybase.
  • I have a public key ASDA5NOeS_OGJGEyRFv4MHc6LYKMtHmvKznuaHzryrdBxQo

To claim this, I am signing this object: