# README
#+title: Siglas
Outputs a png image showing a circle with 2 centered letters
[[file:./image.png]]
(Sample output)
- How to use ** Go Project as a Package
- Import siglas into your project #+begin_src golang import ( "github.com/open-wm/siglas" ) #+end_src
- Then run the ReadDefaultFont() to read the default font embeded (noto-font) #+begin_src golang if err := siglas.ReadDefaultFont(); err != nil { log.Println("Error, couldnt read the font", err) return } #+end_src
- Register the HandlerFunc to the path you want #+begin_src http.HandleFunc("/", siglas.GetIconHandler) #+end_src
** Standalone web server)
- clone the repo then
- go run -v ./main.go
then go to http://localhost:8080/?label=FA&bg=FF5733&fg=FFFFFF&size=25000
The Query params available atm:
- label= string of 2 chars
- fg= foreground color in "hex format" without the #!
- bg= background color in "hex format" without the #!
- size=2500 size of the circle (it is clipped to 2500)
Further on it would be cool to add font styles, borders rounded percentage, etc
# Functions
expected URL format: http://localhost:8080/?label={STRING}&bg={HEX}&fg={HEX}&size={SIZE_IN_PX}.
No description provided by the author
No description provided by the author
No description provided by the author