Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Globally change font size for all layers
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |