Code Monkey home page Code Monkey logo

glyphy.jl's Introduction

glyphy splash image

Glyphy

Glyphy is a small utility package that searches through the names of glyphs in the Unicode glyph list and returns a list of the glyph names that match the search term.

using Glyphy
julia> glyphy("peacock")

1f99a   ๐Ÿฆš       peacock
 found one glyph matching "peacock"

There might be a few:

julia> glyphy("smiling")

0263a   โ˜บ   โœ“    white smiling face
0263b   โ˜ป   โœ“    black smiling face
1f601   ๐Ÿ˜       grinning face with smiling eyes
1f603   ๐Ÿ˜ƒ       smiling face with open mouth
1f604   ๐Ÿ˜„       smiling face with open mouth and smiling eyes
1f605   ๐Ÿ˜…       smiling face with open mouth and cold sweat
1f606   ๐Ÿ˜†       smiling face with open mouth and tightly-closed eyes
1f607   ๐Ÿ˜‡       smiling face with halo
1f608   ๐Ÿ˜ˆ       smiling face with horns
1f60a   ๐Ÿ˜Š       smiling face with smiling eyes
1f60d   ๐Ÿ˜       smiling face with heart-shaped eyes
1f60e   ๐Ÿ˜Ž       smiling face with sunglasses
1f619   ๐Ÿ˜™       kissing face with smiling eyes
1f638   ๐Ÿ˜ธ       grinning cat face with smiling eyes
1f63a   ๐Ÿ˜บ       smiling cat face with open mouth
1f63b   ๐Ÿ˜ป       smiling cat face with heart-shaped eyes
1f642   ๐Ÿ™‚       slightly smiling face
1f92d   ๐Ÿคญ       smiling face with smiling eyes and hand covering mouth
1f970   ๐Ÿฅฐ       smiling face with smiling eyes and three hearts
1f972   ๐Ÿฅฒ       smiling face with tear
 found 20 glyphs matching "smiling"

Here, the check mark indicates that the glyph is defined in the current release of the JuliaMono font (it doesn't know which font you're currently using in your terminal).

Glyphy can also look for the glyph with a specific integer code point. It's usual to type them as hexadecimal integers, so 0x2055, 0x1f638, etc.

julia> glyphy(0x1f638)

1f638   ๐Ÿ˜ธ        grinning cat face with smiling eyes
 You can enter this glyph by typing \:smile_cat: TAB

You can look for ranges and arrays of values:

julia-1.9> glyphy(0x32:0x7f)

00032   2   โœ“    digit two
00033   3   โœ“    digit three
00034   4   โœ“    digit four
00035   5   โœ“    digit five
00036   6   โœ“    digit six
00037   7   โœ“    digit seven
00038   8   โœ“    digit eight
00039   9   โœ“    digit nine
...
0007b   {   โœ“    left curly bracket
0007c   |   โœ“    vertical line
0007d   }   โœ“    right curly bracket
0007e   ~   โœ“    tilde
julia-1.9> glyphy([0x63, 0x2020, 0x2640])

00063   c   โœ“    latin small letter c
02020   โ€    โœ“    dagger
02640   โ™€   โœ“    female sign
julia-1.9> glyphy("^z.*")

0200b   โ€‹         zero width space
0200c   โ€Œ         zero width non-joiner
0200d   โ€         zero width joiner
022ff   โ‹ฟ   โœ“    z notation bag membership
02981   โฆ   โœ“    z notation spot
02982   โฆ‚   โœ“    z notation type colon
...

There are over 30,000 characters to search, so searches might take a few milliseconds...

Sources

The current version of Unicode is 15.0, released in 2022. The glyph list used by Glyphy is the file UnicodeData.txt from here, dated 2022-08-03 17:00.

JuliaMono font is at version v0.052, 2023-11-30.

Glyphy is also available as a web service, at glyphy.info:

glyphy.info

glyphy.jl's People

Contributors

cormullion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

glyphy.jl's Issues

`ERROR: cfunction: closures are not supported on this platform` on M1 Macs

Example:

julia> glyphy("peacock")
ERROR: cfunction: closures are not supported on this platform
Stacktrace:
 [1] register(db::SQLite.DB, func::Function; nargs::Int64, name::String, isdeterm::Bool)
   @ SQLite ~/.julia/packages/SQLite/aeqsS/src/UDF.jl:247
 [2] register
   @ ~/.julia/packages/SQLite/aeqsS/src/UDF.jl:233 [inlined]
 [3] _query_db(querystring::String)
   @ Glyphy ~/.julia/packages/Glyphy/jvwwz/src/Glyphy.jl:21
 [4] glyphy(s::String; showall::Bool)
   @ Glyphy ~/.julia/packages/Glyphy/jvwwz/src/Glyphy.jl:83
 [5] glyphy(s::String)
   @ Glyphy ~/.julia/packages/Glyphy/jvwwz/src/Glyphy.jl:75
 [6] top-level scope
   @ REPL[8]:1
julia> Pkg.status("Glyphy")
Status `~/.julia/environments/v1.8/Project.toml`
  [e3b492bb] Glyphy v1.0.0

julia> versioninfo()
Julia Version 1.8.4
Commit 00177ebc4fc (2022-12-23 21:32 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.5.0)
  CPU: 10 ร— Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 1 on 8 virtual cores

I am running on macOS 13.1 on an M1 Pro mac.

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.