Skip to content

Instantly share code, notes, and snippets.

View ravshansbox's full-sized avatar

Ravshan Samandarov ravshansbox

View GitHub Profile
#!/usr/bin/env python3
import fontforge
import sys
if len(sys.argv) < 3:
print("Usage: python remove_calt.py input_font output_font")
sys.exit(1)
input_font = sys.argv[1]
output_font = sys.argv[2]
import fs from 'node:fs';
fs.readdirSync('./in')
.map((file) => {
const name = file
.replace(/\.(otf|ttf)/, '')
.match(/[A-Z][a-z]+/g)
.join(' ');
return `/FontPatcher/font-patcher --outputdir ./out --name "${name}" --complete --mono ./in/${file};`;
})
@ravshansbox
ravshansbox / .vimrc
Last active February 20, 2025 02:19
set cursorline
set expandtab
set hlsearch
set incsearch
set laststatus=2
set noshowmode
set number
set shiftwidth=2
set tabstop=2
set viminfo=
#!/usr/bin/fontforge
import fontforge
import sys
# Check if input and output paths are provided
if len(sys.argv) < 3:
print("Usage: fontforge -script remove_features.py input.ttf output.ttf")
sys.exit(1)
input_font = sys.argv[1]
import fontforge
import sys
import math
if len(sys.argv) != 8:
print("Usage: python italicize.py <input-font> <output-font> <font-name> <family-name> <full-name> <font-weight> <italic-degree>")
sys.exit(1)
input_font = sys.argv[1]
output_font = sys.argv[2]
import fontforge
import sys
def increase_line_spacing(input_font, output_font, increase_factor):
font = fontforge.open(input_font)
# Store the original values
original_em = font.em
original_ascent = font.ascent
original_descent = font.descent
set incsearch
set laststatus=2
set noshowmode
set ruler
set termguicolors
set ttimeout ttimeoutlen=0
set viminfo=
call plug#begin()
Plug 'catppuccin/vim'
const name = 'RSA-OAEP';
const hash = 'SHA-256';
const modulusLength = 2048;
const publicExponent = new Uint8Array([1, 0, 1]);
const format = 'spki';
const message = 'hello';
// browser
const { privateKey, publicKey } = await crypto.subtle.generateKey(
{ name, hash, modulusLength, publicExponent },
name: Build Docker Image
on:
push:
branches: ['main']
jobs:
build_api:
runs-on: ubuntu-latest
steps:
const shallowEqual = (value1, value2) => {
if (Object.is(value1, value2)) {
return true;
}
const keys1 = Object.keys(value1);
const keys2 = Object.keys(value2);
if (Object.is(keys1.length, keys2.length)) {
return false;
}