diff options
Diffstat (limited to 'imageto/out-chars.c')
-rw-r--r-- | imageto/out-chars.c | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/imageto/out-chars.c b/imageto/out-chars.c index 2ad9325..6c2f8da 100644 --- a/imageto/out-chars.c +++ b/imageto/out-chars.c @@ -1,20 +1,21 @@ -/* out-chars.c: try to extract the real characters from the image. +# out-chars.c: try to extract the real characters from the image. +# +# Copyright (C) 1992, 1993, 2004, 2011 Free Software Foundation, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# -Copyright (C) 1992, 1993, 2004, 2011 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "config.h" @@ -68,7 +69,7 @@ boolean print_guidelines = false; ordering in the font file. (-range) */ int starting_char = 0; int ending_char = MAX_CHARCODE; - + /* The design size of the font we're creating. */ static real design_size; @@ -91,7 +92,7 @@ static void image_to_bitmap_bbs (bb_list_type *); extern void offset_bb_list (bb_list_type *l, int offset); static unsigned output_chars (bb_list_type, bitmap_type, real, image_char_list_type, unsigned); - + /* Analyze the input image, outputting the characters we find. */ void @@ -170,7 +171,7 @@ write_image_chars (image_header_type image_header, real ds) free_bitmap (image_line_bitmap); } } - + /* Analyze and output all of the bitmap IMAGE, which is one line of type in the original. The resolution of the image is H_RESOLUTION, and we've read NCHARS characters (including .notdefs) so far. We use @@ -359,7 +360,7 @@ fclose(testfileptr); return true; } - + /* Move all the elements in BB_LIST to the right by OFFSET. */ void @@ -387,7 +388,7 @@ bb_equal_p (bounding_box_type bb1, bounding_box_type bb2) && MAX_COL (bb1) == MAX_COL (bb2) && MAX_ROW (bb1) == MAX_ROW (bb2); } - + /* For each bounding box in the list BOXES, extract from IMAGE_LINE_BITMAP and turn the resulting bitmap into a single character in the font. The information in IMAGE_CHAR_LIST maps bounding boxes to character codes; @@ -568,7 +569,7 @@ fclose(testfileptr); return nchars_written; } - + /* Remove bits of adjacent characters that may have crept into B because of overlapping characters in the original image. KNOWN_BOXES lists all the known parts of B; if we find other bounding boxes in B, we @@ -662,7 +663,7 @@ image_to_bitmap_bbs (bb_list_type *boxes) MAX_ROW (*bb) -= min_row; } } - + /* Derive the information necessary to output the font character from the bitmap B, and return it. The resolution of the bitmap is given in pixels per inch as H_RESOLUTION. The bounding box BB encloses the |