Signed distance field font and image command line tool based on OpenCL.

Overview

SDFTool

Signed distance field font and image command line tool based on OpenCL.

Build

Windows

Run cargo build --release in Visual Studio developer x64 command prompt.

macOS/Linux

Run cargo build --release in terminal.

Install

Windows

Run cargo install --git https://github.com/Strrationalism/SDFTool.git sdftool in Visual Studio developer x64 command prompt.

macOS/Linux

Run cargo install --git https://github.com/Strrationalism/SDFTool.git sdftool in terminal.

Usage

Show OpenCL devices

sdftool cl-devices

Create SDF image for PNG symbol

USAGE:
    sdftool symbol [FLAGS] [OPTIONS]  

FLAGS:
        --cpu        Do not use OpenCL.
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --device-id 
    
                 Select the device to use [default: 0]
        --platform-id 
     
              Select the platform to use [default: 0]
    -r, --search-radius 
      
           Set the radius for edge searching [default: 128]
    -s, --stride 
       
         Set the downsample stride size (1 will not downsample) [default: 4] ARGS: 
         Symbol image in PNG format 
         Output path for SDF image in PNG format 
       
      
     
    

Create SDF font atlas from TTF/OTF

USAGE:
    sdftool font [FLAGS] [OPTIONS]  
   
    

FLAGS:
        --cpu              Do not use OpenCL.
    -h, --help             Prints help information
        --no-ascii         Do not generate ascii charset
        --schinese-punc    Generate punctuations for schinese
        --schinese-1       Generate common standard chinese table 1
        --schinese-2       Generate common standard chinese table 2
        --schinese-3       Generate common standard chinese table 3
    -V, --version          Prints version information

OPTIONS:
    -c, --charset 
    
     ...             Additional charset to generate
        --margin-x 
     
                    Margin X on every sdf character in pixels [default: 0]
        --margin-y 
      
                     Margin Y on every sdf character in pixels [default: 0]
        --origin-scale 
       
         Basic font scale before downsample [default: 384] --padding-x 
        
          Padding X on every basic character in pixels [default: 24] --padding-y 
         
           Padding Y on every basic character in pixels [default: 24] --page-height 
          
            Single page height in pixels [default: 1024] --page-width 
           
             Single page width in pixels [default: 1024] -r, --search-radius 
            
              Set the radius for edge searching [default: 24] -s, --stride 
             
               Set the downsample stride size (1 will not downsample) [default: 8] ARGS: 
               Input ttf/otf file 
              
                Output path 
              
             
            
           
          
         
        
       
      
     
    
   
You might also like...
Rust library to get image size and format without loading/decoding

imageinfo-rs Rust library to get image size and format without loading/decoding. The imageinfo don't get image format by file ext name, but infer by f

Simple image metadata scrubber. Will remove EXIF, XMP and IPTC metadata.

Simple image metadata scrubber. Will remove EXIF, XMP and IPTC metadata.

Image processing proxy and API, created to allow faster media delivery for the Holaplex storefront.

Description imgopt is an image processing proxy with a very simple API, created to download and dynamically scaledown, convert, and cache different me

Fastest image quadtree stylization implementation to date, capable of hundreds of fps and avoiding ugly non-squares.
Fastest image quadtree stylization implementation to date, capable of hundreds of fps and avoiding ugly non-squares.

Quadim Fastest image quadtree stylization implementation to date, capable of hundreds of fps and avoiding ugly non-squares. 简体中文 如果你是从B站来的…… “Listen t

Image processing operations

imageproc An image processing library, based on the image library. There may initially be overlap between the functions in this library and those in i

Image Compression Algorithm
Image Compression Algorithm

Image Compression Algorithm 🦭 A new lossless image compression algorithm. In the newest version the algorithm performs rather good, but manages to su

Artsy pixel image to vector graphics converter
Artsy pixel image to vector graphics converter

inkdrop inkdrop is an artsy bitmap to vector converter. Command line interface The CLI binary is called inkdrop-cli and reads almost any image bitmap

Automated image compression for efficiently distributing images on the web.

Imager Apparently this project made it into the GitHub Archive Program. About Imager is a tool for automated image compression, and can competitively

Open Graphic Image Writer
Open Graphic Image Writer

Open Graphic Image Writer Documentation You can generate Open Graphic Image dynamically. A CSS-like API. You can generate image by using template imag

Owner
弦语蝶梦
一个独立游戏制作组。
弦语蝶梦
Takes a folder of images (as a palette), and an image, and figures out how to tile the palette to resemble the image!

Takes a folder of images (as a palette), and an image, and figures out how to tile the palette to resemble the image!

Jacob 258 Dec 30, 2022
Lust is a static image server designed to automatically convert uploaded image to several formats and preset sizes

What is Lust? Lust is a static image server designed to automatically convert uploaded image to several formats and preset sizes with scaling in mind.

Harrison Burt 242 Dec 22, 2022
Rust Lean Image Viewer - Fast and configurable image viewer inspired by JPEGView by David Kleiner

Rust Lean Image Viewer - Fast and configurable image viewer inspired by JPEGView by David Kleiner

3top1a 4 Apr 9, 2022
Convert UFO .glif files to SVG, whether they're part of a font or not

Convert UFO glyph files (.glif) to SVG There exists already an svg2glif, but for some reason not the opposite operation. My MFEKglif editor treats .gl

Modular Font Editor K 3 Apr 26, 2022
A cross platform reloading image viewer combined with a command executor

Watchout A cross platform reloading image viewer combined with a command executor. Watchout will do any of the following: Run a command when any file

Benedikt Terhechte 6 Oct 7, 2022
Rust based breadth first search maze image solver

maze_solver Rust based breadth first search maze image solver Works on black and white images with provided start and end points. Usage: maze_solver

null 0 Jan 31, 2022
tai (Terminal Ascii Image) tool to convert images to ascii written in Rust

TAI Terminal Ascii Image A tool to convert images to ascii art written in Rust ?? Notes This tool is still in development stage. Contributions All Con

Mustafa Salih 258 Dec 5, 2022
Focus Annotator - a tool for annotation the focal plane of a part of an image

Focus Annotator Focus Annotator is a tool for annotation the focal plane of a part of an image. It is a tool I built in rust as part of my master's th

Hannes Kuchelmeister 17 Sep 27, 2022
Brings all relevant command-line tesseract functionality to Rust

rusty-tesseract A Rust wrapper for Google Tesseract Description Brings all relevant command-line tesseract functionality to Rust Based on the Python w

null 28 Dec 8, 2022
Control Google Pixel Buds Pro from the Linux command line.

pbpctrl Control Google Pixel Buds Pro from the Linux command line. Might or might not work on other Pixel Buds devices. Allows reading of battery, har

Maximilian Luz 6 Jan 10, 2023