1.2.3-SNAPSHOT Arrow_down_16x16

export-font

incanter.processing

  • (export-font font-name size smooth filename)
  • (export-font font-name size filename)
Exports the given system font to a vlw file.

Examples:

(use '(incanter core processing))
(export-font "Ariel" 48 "/tmp/ariel_48.vlw")

(view
(sketch
(setup []
(let [font (load-font this "/tmp/ariel_48.vlw")]
(doto this
(text-font font)
smooth
(fill 0))))

(draw []
(doto this
(text "LAX" 0 40)
(text "AMS" 0 70)
(text "FRA" 0 100))))
:size [120 120])


0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source incanter/processing.clj:388 top

(defn export-font
" Exports the given system font to a vlw file.

  Examples:

    (use '(incanter core processing))
    (export-font \"Ariel\" 48 \"/tmp/ariel_48.vlw\")

    (view
      (sketch
        (setup []
          (let [font (load-font this \"/tmp/ariel_48.vlw\")]
            (doto this
              (text-font font)
              smooth
              (fill 0))))

            (draw []
              (doto this
                (text \"LAX\" 0 40)
                (text \"AMS\" 0 70)
                (text \"FRA\" 0 100))))
      :size [120 120])


"
  ([font-name size smooth filename]
    (let [sketch (processing.core.PApplet.)
          font (create-font sketch font-name size smooth)]
      (save-font sketch font filename)))
  ([font-name size filename]
    (export-font font-name size true filename)))
Vars in incanter.processing/export-font: defn let
Used in 0 other vars

Comments top

No comments for export-font. Log in to add a comment.