Skip to content

Commit

Permalink
Globally change font size for all layers
Browse files Browse the repository at this point in the history
  • Loading branch information
akkana committed Feb 19, 2016
1 parent cb16944 commit 6eabb6d
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions fontsize.py
@@ -0,0 +1,34 @@
#!/usr/bin/env python

from gimpfu import *

def python_change_font_size(img, fontsize) :
pdb.gimp_image_undo_group_start(img)

for l in img.layers:
if not pdb.gimp_item_is_text_layer(l):
continue
# pdb.gimp_text_layer_set_font(l, font)
pdb.gimp_text_layer_set_font_size(l, fontsize, 0)

pdb.gimp_image_undo_group_end(img)

register(
"python_fu_change_font_size",
"Change every text layer in an image to a new font size",
"Change every text layer in an image to a new font size",
"Akkana Peck",
"Akkana Peck",
"2016",
"Change Font Sizes...",
"*",
[
(PF_IMAGE, "image", "Input image", None),
(PF_SPINNER, "fontsize", "New Font Size",
14, (1, 50, 1))
],
[],
python_change_font_size,
menu="<Image>/Filters/Generic")

main()

0 comments on commit 6eabb6d

Please sign in to comment.