US20210303945A1 - Printing apparatus, printing method, and non-transitory computer-readable recording medium therefor - Google Patents
Printing apparatus, printing method, and non-transitory computer-readable recording medium therefor Download PDFInfo
- Publication number
- US20210303945A1 US20210303945A1 US17/130,000 US202017130000A US2021303945A1 US 20210303945 A1 US20210303945 A1 US 20210303945A1 US 202017130000 A US202017130000 A US 202017130000A US 2021303945 A1 US2021303945 A1 US 2021303945A1
- Authority
- US
- United States
- Prior art keywords
- width
- font
- glyph
- target character
- fixed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K15/00—Arrangements for producing a permanent visual presentation of the output data, e.g. computer output printers
- G06K15/02—Arrangements for producing a permanent visual presentation of the output data, e.g. computer output printers using printers
- G06K15/18—Conditioning data for presenting it to the physical printing elements
- G06K15/1801—Input data handling means
- G06K15/1822—Analysing the received data before processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K15/00—Arrangements for producing a permanent visual presentation of the output data, e.g. computer output printers
- G06K15/02—Arrangements for producing a permanent visual presentation of the output data, e.g. computer output printers using printers
- G06K15/18—Conditioning data for presenting it to the physical printing elements
- G06K15/1801—Input data handling means
- G06K15/1802—Receiving generic data, e.g. fonts, colour palettes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K15/00—Arrangements for producing a permanent visual presentation of the output data, e.g. computer output printers
- G06K15/02—Arrangements for producing a permanent visual presentation of the output data, e.g. computer output printers using printers
- G06K15/18—Conditioning data for presenting it to the physical printing elements
- G06K15/1835—Transforming generic data
- G06K15/1836—Rasterization
Definitions
- the present disclosures relate to a printing apparatus configured to create raster data using fonts stored in the printing apparatus when printing is performed based on print data described in a page-description language.
- the present disclosures also relate to a printing method applicable to such a printing apparatus and a non-transitory computer-readable recording medium storing instructions realizing such a method.
- the print data described in the page-description language includes various information such as drawing information of graphics, font information for characters, printing position information for characters and glyph width information which indicates a width from an origin of a character to the origin of a next character for each character.
- the print data also includes commands.
- the printing apparatus employs a RIP (Raster Image Processor) which is configured to analyze the commands included in the print data and create the raster data. The printing apparatus then prints images based on the thus created raster data.
- RIP Raster Image Processor
- the printing apparatus generally stores font information therein.
- the printing apparatus selects one of the fonts the printing apparatus stores as a substitute font and creates the raster data such that each character in the substitute font is arranged within a glyph width which is designated and assigned to the character by the print data.
- the printing apparatus creates the raster data by reducing a size of the character expressed by the substitute font such that the glyph width of the substitute font is arranged within the glyph width designated by the print data.
- the font there has been known a fixed-width font which has a fixed width for any character.
- the glyph width for the character having a relatively small width such as “I”
- the glyph width for the character having a relatively larger width such as “W” by adding blank spaces around the glyph having the small width.
- the glyph width expressed by the fixed-width font for the character “I” is reduced so that the glyph width expressed by the fixed-width font for the character “I” is equal to or less than the glyph width designated by the print data.
- the character “I” itself is excessively reduced due to the blank spaces added around the character “I” and printed onto a printing sheet in an unnatural shape.
- a printing apparatus which is provided with a controller configured to perform a RIP process of analyzing print data and create raster data based on print data, the print data being configured such that a target character and a glyph width for each character are described in a page description language, the glyph width being defined as a distance between an origin of the target character and an origin of a character next to the target character, the target character being arranged within the glyph width designated by the print data in creating the raster data, a printing device configured to print an image based on the raster data, and a storage device configured to store fixed-width font information in which a fixed width is assigned to each character.
- the controller is further configured to arrange, in the RIP process, the target character expressed by the fixed-width font such that the width of the bounding box is arranged within the glyph width.
- a printing apparatus provided with a controller configured to perform a RIP process of analyzing print data and create raster data based on print data, the print data being configured such that a target character and a glyph width for each character are described in a page description language, the glyph width being defined as a distance between an origin of the target character and an origin of a character next to the target character, the target character being arranged within the glyph width designated by the print data in creating the raster data, a printing device configured to print an image based on the raster data, and a storage device configured to store fixed-width font information in which a fixed width is assigned to each character and a proportional font in which different widths are assigned to respective characters.
- the controller is further configured to perform, in the RIP process, when the glyph width of the target character is equal to a width of the target character expressed by the determined one of the fixed-width font and the proportional font, arranging the target character expressed by the determined one of the fixed-width font and the proportional font so that the width of the target character expressed by the determined one of the fixed-width font and the proportional font coincides with the glyph width, when the glyph width of the target character is larger than the width of the target character expressed by the determined one of the fixed-width font and the proportional font, arrange the target character expressed by the determined one of the fixed-width font and the proportional font such that the width of the target character expressed by the determined one of the fixed-width font and the proportional font is within the glyph width, when the glyph width of the target character is smaller than the width of the target character expressed by the determined one of the fixed-width font and
- a printing method which includes performing a RIP process of analyzing print data and create raster data based on print data, the print data being configured such that a target character and a glyph width for each character are described in a page description language, the glyph width being defined as a distance between an origin of the target character and an origin of a character next to the target character, the target character being arranged within the glyph width designated by the print data in creating the raster data, and printing an image based on the raster data.
- the method further comprises arranging the target character expressed by the fixed-width font such that the width of the bounding box is arranged within the glyph width.
- a non-transitory computer-readable recording medium for a printing apparatus having a controller, the recording medium storing computer-executable instructions which cause, when executed by the controller, the printing apparatus to perform a RIP process of analyzing print data and create raster data based on print data, the print data being configured such that a target character and a glyph width for each character are described in a page description language, the glyph width being defined as a distance between an origin of the target character and an origin of a character next to the target character, the target character being arranged within the glyph width designated by the print data in creating the raster data, and print an image based on the raster data.
- the instructions further causes, when executed by the controller, the printing apparatus to arrange the target character expressed by the fixed-width font such that the width of the bounding box is arranged within the glyph width.
- FIG. 1 is a block diagram illustrating a brief configuration of a printer according to an embodiment of the present disclosures.
- FIG. 2 illustrates definitions of a bounding box, a bounding box width, and a glyph width.
- FIGS. 3A-3C show an example when a substitute font is a proportional font according to conventional art.
- FIGS. 4A-4C show an example when a substitute font is a fixed-width font according to conventional art.
- FIG. 5 shows a flowchart illustrating a RIP process performed by the printer shown in FIG. 1 .
- FIG. 6 shows a flowchart illustrating an analyzing process to analyze a font selecting operator.
- FIG. 7 shows a flowchart illustrating an analyzing process to analyze a character drawing operator.
- FIGS. 8A-8C show an example of a position compensating process performed in the analyzing process shown in FIG. 7 .
- FIGS. 9A-9C show an example of a position compensating process performed in the analyzing process shown in FIG. 7 .
- FIGS. 10A-10C show an example of a scaling process performed in the analyzing process shown in FIG. 7 .
- FIG. 1 is a block diagram illustrating a schematic configuration of a printer 1 .
- the printer 1 is an example of a printing apparatus according to aspects of the present disclosures.
- the printer 1 is connected to an external device 2 .
- the printer 1 is configured to print images on a printing sheet based on an instruction from the external device 2 .
- One example of the external device 2 is a host computer.
- the printer 1 includes a controller 11 , an input device 12 , a program storage 13 , a font storage 14 , a display device 15 , a printing device 16 , and a sheet feeder 17 .
- the input device 12 is configured to receive, from a user, various instructions directed to the printer 1 .
- the program storage 13 is configured to store control programs executed by the controller 11 .
- the font storage 14 is configured to store substitute fonts used by the printer 1 . A fixed-width font and a proportional font are available as the substitute fonts.
- the display device 15 is configured to display various screens under control of the controller 11 .
- the printing device 16 is configured to print characters and/or images based on print data and instructions received from the external device 2 , on the printing sheet supplied from the sheet feeder 17 .
- the sheet feeder 17 is configured to supply the printing sheets one by one to the printing device 16 .
- the print data has a PDF file format.
- images are described according to a page-description language based on PostScript®.
- the page-description language does not need to be limited to the PostScript, but PCL® or LIPS® can also be used as the page-description language.
- the controller 11 is configured to analyze the operator to determine a glyph width, which represents a distance between two adjacent glyph origins (see FIG. 2 ). In other words, the glyph width is equal to a width of a body corresponding to the character “g” in a certain font.
- a bounding box of the glyph, a bounding box width of the glyph, and the glyph width will be described using a lower-case alphabet “g” as an example of the glyph. It is noted that a graphical representation of the lower-case “g” is the glyph, and a rectangle externally contacts the glyph “g” is a bounding box of the glyph. A width of the bounding box is referred to as a bounding box width.
- the glyph width is a distance between the glyph origin of the glyph of interest and a next glyph origin, which is the glyph origin of a glyph next to the glyph of interest (i.e., “g”). It is noted that the bounding box width represents a width of a character, while the glyph width defines a width of an area of the character and is slightly wider than the bounding box width.
- the printer 1 performs the RIP process in which the PDF data is converted to the raster data.
- the RIP process includes an analyzing process in which the multiple operators in the PDF data are analyzed successively, a creating process in which drawing objects obtained in the analyzing process such as character strings, graphics and/or images are successively arranged in an image space for one page, and a writing process in which the one page of image created in the creating process is written in a storage (not shown) as the raster data.
- the printer 1 is configured to print an image represented by the raster data created in the RIP process on the printing sheet with use of the printing device 16 .
- the operators regarding the drawing of the glyph of the character in the PDF data designates, for one character or one character string, a font name, a font type, an attribution such as italic or bold, and a fixed-width font (non-proportional font) or a proportional font.
- font information necessary to draw the glyph designated by the operator is incorporated in the PDF data, and where the font information necessary to draw the glyph designated by the operator is not incorporated in the PDF data. It is noted that the font information may be a program for drawing the glyph.
- the controller 11 draws the glyph at a particular position in the image space for one page using the font information incorporated in the PDF data when executing the RIP process.
- the image space for one page is finally written out as the raster data.
- FIG. 3A schematically shows an example in which an operator in the PDF data designates a proportional font, but the PDF data does not contain font information of the designated proportional font, and controller 11 selects another proportional font as the substitute font.
- the glyph origins G 1 , G 2 , G 3 and G 4 are determined.
- a glyph of a character “A” is drawn within a glyph width W 11 between the glyph origins G 1 and G 2
- a glyph of a character “I” is drawn within a glyph width W 12 between the glyph origins G 2 and G 3
- a glyph of a character “B” is drawn within a glyph width W 13 between the glyph origins G 3 and G 4 .
- FIG. 3A shows this state such that the glyphs of the characters “A,” “I,” and “B” are not shown, but only the glyph width W 11 , W 12 and W 13 are indicated as widths for blank spaces.
- FIG. 3B illustrates an example of glyphs MP 1 , MP 2 and MP 3 of a proportional font stored in the font storage 14 as a substitute font. It is noted that when the glyphs MP 1 , MP 2 and MP 3 are collectively referred to, a term “glyphs MP” will be used.
- the glyphs MP 1 , MP 2 and MP 3 expressed by the proportional font represent characters “A,” “I,” and “B,” respectively.
- the glyph widths W 21 , W 22 and W 23 are different depending on the characters. It is noted that when the glyph widths W 21 , W 22 and W 23 are collectively referred to, a term “glyph widths W 2 ” will be used.
- the font storage 14 stores glyph information of the proportional font as information of respective character shapes. It is noted that the origins G 01 , G 02 and G 03 represent the origins of the glyphs MP 1 , MP 2 and MP 3 of the proportional font, respectively.
- FIG. 3C illustrates a case where the glyphs MP (see FIG. 3B ) of the proportional font stored in the font storage 14 are arranged at particular positions in the image space for one page designated by the PDF data.
- the controller 11 draws the glyph MP 1 expressed by the proportional font in the image space for one page with respect to the origin O 1 .
- the glyph width W 11 which is a distance between the glyph origins G 1 and G 2 , is larger than the glyph width W 21 of the substitute font. Therefore, the origin O 1 is determined in accordance with the following equation.
- Origin O 1 glyph origin G 1+(glyph width W 11 ⁇ glyph width W 21)/2
- the origin O 1 which is determined based on the above equation, is a position in an X direction with respect to the glyph origin G 1 .
- the controller 11 draws the glyph MP 2 of the proportional font in the image space for one page with respect to the origin O 2 .
- the origin O 2 is determined in accordance with the following equation, in a similar way to the origin O 1 .
- Origin O 2 glyph origin G 2+(glyph width W 12 ⁇ glyph width W 22)/2
- the controller 11 draws the glyph MP 3 of the proportional font in the image space for one page with respect to on the origin O 3 .
- the origin O 3 is determined in accordance with the following equation.
- Origin O 3 glyph origin G 3+(glyph width W 13 ⁇ glyph width W 23)/2
- the controller 11 reduce the glyph MP in the X direction so that the glyph width W 2 is reduced (hereinafter, such an operation will be described as “reducing the glyph width W 2 in the X direction”), before drawing the glyph MP expressed by the proportional font in the image space for one page with respect to the glyph origin G 1 .
- the controller 11 reduces the glyph width W 2 in the X direction so that the reduced glyph width W 2 is equal to or less than the glyph width W 1 .
- FIG. 4A shows a case where the operator in the PDF data designates a proportional font, but the PDF data does not include the font information of the designated proportional font, and the controller 11 selects a fixed-width font as the substitute font ( FIGS. 4B and 4C ).
- the glyph origins G 1 , G 2 , G 3 and G 4 can be determined by analyzing operators included in the PDF data and designating characters.
- a glyph of a character “A” is to be drawn within a glyph width W 11 between the glyph origins G 1 and G 2
- a glyph of a character “I” is to be drawn within a glyph width W 12 between the glyph origins G 2 and G 3
- a glyph of a character “B” is to be drawn within a glyph width W 13 between the glyph origins G 3 and G 4 .
- each of the glyph widths W 11 , W 12 and W 13 are illustrated as blank areas without drawing the glyphs of the characters “A,” “I” and “B.”
- FIG. 4B illustrates an example of glyphs MT 1 , MT 2 and MT 3 of a target character expressed by the fixed-width font stored in the font storage 14 as a substitute font.
- the glyphs MT 1 , MT 2 and MT 3 will be referred to as the “glyphs MT of the target character expressed by the fixed-width font.”
- the glyphs MT 1 , MT 2 and MT 3 of characters expressed by the fixed-width font represent the characters “A,” “I” and “B,” respectively.
- glyph widths W 21 , W 22 and W 23 are the same regardless of the characters.
- the origins G 01 , G 02 and G 03 represent origins of the glyphs MT 1 , MT 2 and MT 3 expressed by the fixed-width font.
- FIG. 4C illustrates a case where the glyphs MT of the character expressed by the fixed-width font stored in the font storage 14 (see FIG. 4B ) as the substitute font are arranged at particular positions designated by the PDF data in an image space for one page.
- the glyph width W 11 is larger than the glyph width W 21 with regard to the glyph of the character “A.”
- the controller 11 draws the glyph of the character “A” in the image space for one page with respect to the origin O 1 .
- the origin O 1 is determined in accordance with the following equation.
- Origin O 1 glyph origin G 1+(glyph width W 11 ⁇ glyph width W 21)/2
- the origin O 1 in the above equation is a position of the origin O 1 in the X direction with respect to the glyph origin G 1 .
- the glyph width W 13 is also larger than the glyph width W 23 with regard to the glyph of the character “B.” Therefore, according to the conventional configuration, the controller 11 draws the glyph of the character “B” similarly as the glyph of the character “A” is drawn.
- the glyph width W 12 is smaller than the glyph width W 22 .
- the process similar to the process using the proportional font as the substitute font is performed when the substitute font is the fixed-width font.
- the controller 11 reduces the glyph width W 22 in the X direction, and the controller 11 draws the glyph of the character “I” in the image space for one page with respect to the glyph origin G 1 .
- the controller 11 draws the glyph of character “I” in the image space for one page by reducing the glyph width W 22 in the X direction so that the reduced glyph width W 22 is equal to or less than the glyph width W 12 .
- FIG. 4C shows a state where the character “I” is reduced in the x-direction excessively due to the blank spaces around the glyph of character “I” expressed by the fixed-width font.
- the controller 11 performs the RIP process shown in FIGS. 5, 6 and 7 . It is noted that the character “I” for which the fixed-width font is selected as the substitute font is an example of the target character.
- FIG. 5 is a flowchart illustrating the RIP process
- FIG. 6 is a flowchart illustrating the process of analyzing the font selecting operator
- FIG. 7 is a flowchart illustrating the process of analyzing the character drawing operator, which are performed by the controller 11 .
- the controller 11 When the printer 1 prints the PDF data received from the external device 2 , the controller 11 performs the RIP process shown in FIG. 5 .
- the RIP process includes the process of analyzing the font selecting operator shown in FIG. 6 , the process of analyzing the character drawing operator shown in FIG. 7 , and processes of analyzing other operators.
- the controller 11 converts the PDF data to the printable raster data by performing the above processes.
- the controller 11 performs the process of analyzing the operators as shown in FIG. 5 .
- the PDF data includes multiple operators such as operators designating images, graphics such as a circle and a square, and/or operators describing texts.
- the controller 11 starts the RIP process to sequentially detect the operators constituting the PDF data from among multiple operators (S 11 ).
- the operators include the character drawing operator, the font selecting operator, and other operators. It is noted that the other operators are the operators designating drawing objects of the images, graphics such as a circle and a square, and perform operations of temporarily writing the drawing objects of the images, graphics such as a circle and a square in a storage of a work area (not shown).
- the controller 11 When the detected operator is one of the other operators (S 12 : “OTHER”), the controller 11 performs the analyzing process of the detected one of the other operators (S 13 ). When the detected operator is the font selecting operator (S 12 : “FONT SELECTING OPERATOR”), the controller 11 performs the process of analyzing the font selecting operator (S 14 ). When the detected operator is the character drawing operator (S 12 : “CHARACTER DRAWING OPERATOR”), the controller 11 performs the process of analyzing the character drawing operator (S 15 ). According to the present embodiment, the controller 11 performs the process of analyzing the font selecting operator ( FIG. 6 ) and the process of analyzing the character drawing operator ( FIG. 7 ) in this order.
- the controller 11 When the controller 11 completes the analyzing processes of all of the operators of the PDF data (S 16 : YES), the controller 11 combines the drawing objects of the images, graphics and/or the characters which have been stored, for all the operators, in the storage of the work area (not shown) as the image space for one page, and stores the combined data in the storage (not shown) as the raster data. Then, the controller 11 terminates the RIP process. Until the processes for analyzing all the operators included in the PDF data are completed (S 16 : NO), the controller 11 repeats S 11 to S 15 .
- the controller 11 analyzes a font dictionary included in the PDF data (S 21 ) and determines whether the font information corresponding to the font designated by the font selecting operator is included in the PDF data (S 22 ). When the font information is included in the PDF data (S 22 : YES), the controller 11 selects the font information designated by the font selecting operator (S 23 ). When the font information is not included in the PDF data (S 22 : NO), the controller 11 selects the substitute font stored in the font storage 14 (S 24 ). In this case, the controller 11 selects one of the substitute fonts, i.e., one of the fixed-width font and the proportional font, based on a condition of glyphs (e.g., character shapes) or the like.
- a condition of glyphs e.g., character shapes
- the glyph width of the glyph designated in the PDF data is referred to as “designated glyph width W 1 ”
- the glyph width of the glyph drawn by using the substitute font is referred to as “drawing glyph width W 2 ”
- the width of the bounding box of the glyph drawn by using the substitute font is referred to as “Bounding box Width W 3 .”
- the drawing glyph width W 2 is a width assigned to a target character, or the width of the character when the substitute font is used.
- the analyzing process of the character drawing operator varies depending on whether the font used for drawing a target PDF data selected in the analyzing process of the font selecting operator is a font corresponding to the font information of the target PDF data or the substitute font.
- the controller 11 obtains the drawing character code (S 31 ).
- the selected font is not the substitute font (S 32 : NO)
- the controller 11 draws, using the font information, the glyph indicated by the drawing character code in the storage of the work area (not shown) as usual (S 33 ), and terminates the process.
- the controller 11 calculates the designated glyph width W 1 and the drawing glyph width W 2 (S 34 ).
- data representing the designated glyph width W 1 the controller 11 analyzes the dictionary included in the PDF data, and obtains data corresponding to the drawing character code from the dictionary included in the PDF data.
- the controller 11 obtains a glyph width of the designated one of substitute fonts the font storage 14 stores and corresponding to a character designated by the drawing character code.
- the drawing glyph width W 2 is a width assigned to the designated substitute font corresponding to the character.
- the controller 11 compares the designated glyph width W 1 with the drawing glyph width W 2 (S 35 ).
- the controller 11 draws the glyph designated by the drawing character code in the storage of the work area (not shown) without compensating the substitute font (S 36 ), and terminates the process. That is, in step S 36 , the controller 11 arranges the target character in the designated substitute font such that the drawing glyph width W 2 coincides with the designated glyph width W 1 .
- the controller 11 compares the designated glyph width W 1 with the drawing glyph width W 2 , and if the designated glyph width W 1 is not equal to the drawing glyph width W 2 (S 35 : NO), but the designated glyph width W 1 is larger than the drawing glyph width W 2 (S 37 : YES), the controller 11 performs a position compensating process to compensate the position of the target character in the substitute font, draws the glyph indicated by the drawing character code (S 38 ), and terminates the process.
- FIGS. 8A-8C illustrate an example of the position compensating process (S 38 ) which is performed by the controller 11 when the designated glyph width W 1 is larger than the drawing glyph width W 2 .
- FIG. 8A schematically shows a case where the operator included in the PDF data designates the fixed-width font, but the PDF data does not have include the font information of the fixed-width font. The process illustrated in FIG. 8A is similar to that in a case where the glyph width W 1 is larger than the glyph width W 2 shown in FIGS. 3 and 4 .
- the glyph origin G 1 and the glyph origin G 2 are defined by the PDF data. Further, an operator designating a character included in the PDF data designates that a glyph of a character “C” is to be drawn within the designated glyph width W 1 .
- the controller 11 cannot draw the glyph of the character “C,” the designated glyph width W 1 is illustrated as a blank space without drawing the glyph of character “C” in FIG. 8A , similarly to cases shown in FIGS. 3A and 4A .
- FIG. 8B illustrates an example of a glyph MT 4 of a character expressed by the fixed-width font stored in the font storage 14 as the substitute font.
- the glyph MT 4 shows the character “C” expressed by the fixed-width font.
- FIG. 8C schematically illustrates a case where the glyph MT 4 of the character “C” expressed by the fixed-width font stored in the font storage 14 as the substitute font (see FIG. 8B ) is drawn at a particular position in the image space for one page designated by the PDF data.
- the controller 11 draws, in S 38 , the glyph of character “C” in the image space for one page with respect to the origin O 1 .
- the designated glyph width W 1 is larger than the drawing glyph width W 2 , a position of the origin O 1 is determined in accordance with the equation below.
- Origin O 1 Glyph Origin G 1+(designated glyph width W 1 ⁇ drawing glyph width W 2)/2
- the controller 11 performs the position compensating process.
- the controller 11 When the designated glyph width W 1 is not larger than the drawing glyph width W 2 (S 37 : NO) and the substitute font to be used is the proportional font (S 39 : YES), the controller 11 performs a scaling process described below and draws the glyph indicated by the drawing character code (S 40 ), and terminates the process.
- the controller 11 reduces the drawing glyph width W 2 in the X direction so that the drawing glyph width W 2 is equal to or smaller than the designated glyph width W 1 (i.e., a character having the drawing glyph width W 2 is reduced in the X direction so that the reduced drawing glyph width W 2 is equal to or less than the designated glyph width W 1 ), thereby the character being drawn in the image space for one page.
- the controller 11 calculates the bounding box width W 3 of the glyph of the character expressed by the fixed-width font (S 41 ).
- the controller 11 compares the designated glyph width W 1 with the bounding box width W 3 .
- the controller 11 performs the position compensating process to compensate the position of the glyph expressed by the fixed-width font, draws the glyph indicated by the drawing character code (S 43 ), and terminates the process.
- FIGS. 9A-9C illustrate the position compensating process (S 43 ) performed by the controller 11 when the substitute font is the fixed-width font and the designated glyph width W 1 is larger than the bounding box width W 3 .
- FIG. 9B illustrates an example of the glyph MT 4 expressed by the fixed-width font stored as the substitute font in the font storage 14 .
- the glyph MT 4 expressed by the fixed-width font indicates the character “C.” Comparing FIG. 9A with FIG. 9B , it is understood that the designated glyph width W 1 is smaller than the drawing glyph width W 2 . Therefore, when the position compensating process shown in FIG. 4C is performed, the width of the character “C” is reduced excessively.
- the controller 11 draws the glyph of the character “C,” which is the glyph MT 4 expressed by the fixed-width font within the designated glyph width W 1 .
- the controller 11 draws the glyph of the character “C,” which is the glyph MT 4 expressed by the fixed-width font, in the image space for one page with respect to the origin O 1 (S 43 ).
- a position of the origin O 1 is determined in accordance with the following equation:
- Origin O 1 glyph origin G 1+(designated glyph width W 1 ⁇ drawing glyph width W 2)/2
- the position of the origin O 1 is an offset position which is offset from the glyph origin G 1 in a direction opposite to the X direction.
- a part of the drawing glyph width W 2 overlaps a part of the designated glyph width of an adjacent glyph on the glyph origin G 1 side viewed from the character “C.”
- a part of the drawing glyph width W 2 also overlaps a part of the designated glyph width of an adjacent glyph on the glyph origin G 2 side viewed from the character “C.” It is noted that the drawing glyph width W 2 and the designated glyph width of an adjacent glyph on the glyph origin G 1 side viewed from the character “C” overlap by the above-described offset amount.
- the controller 11 arranges the character “C” such that a center of the designated glyph width W 1 coincides with a center of the drawing glyph width W 2 , as a consequence. Since the designated glyph width W 1 is larger than the bounding box width W 3 , it is unnecessary to reduce the character width of the character “C” in the position compensating process in S 43 .
- FIGS. 10A-10C illustrate the scaling process (S 44 ) performed by the controller 11 when the substitute font is the fixed-width font and the designated glyph width W 1 is equal to or smaller than the bounding box width W 3 .
- FIG. 10A shows a case where an operator included in the PDF data designates the fixed-width font, but the PDF data does not include the font information of the fixed-width font.
- the glyph origin G 1 and the glyph origin G 2 are defined by the PDF data. Further, by the operator designating the character in the PDF data, it is defined that a glyph of the character “C” is drawn within the designated glyph width W 1 . When the font information is not included in the PDF data, the glyph of the character “C” cannot be drawn. Therefore, the designated glyph width W 1 is expressed as a blank space without drawing the glyph of character “C” in FIG. 10A , as is described referring to the examples shown in FIGS. 3A and 4A .
- FIG. 10B illustrates an example of a fixed-width font stored in the font storage 14 as the substitute font.
- FIG. 10B shows the character “C” expressed by the fixed-width font.
- FIG. 10C schematically illustrates a case where the glyph of character “C” expressed by the fixed-width font stored in the font storage 14 as the substitute font shown in FIG. 10B is arranged, in FIG. 10A , at a particular position in an image space for one page designated by the PDF data.
- the controller 11 reduces the drawing glyph width W 2 in the X direction so that the character “C” having the drawing glyph width W 2 is arranged within the designated glyph width W 1 , and draws the reduced glyph in the image space for one page. According to an example shown in FIG. 10C , the controller 11 reduces the drawing glyph width W 2 so that the reduced drawing glyph width W 2 coincides with the designated glyph width W 1 .
- the printer 1 may be connected to a server, and the above-described processes performed by the controller 11 of the printer 1 may be performed by the server.
- the printer 1 sends the input PDF data to the server, and the printer 1 receives, from the server, a result of the process which is equivalent to the process the controller 11 would apply to the input PDF data, and performs the printing.
- a control block of the printer 1 (especially the controller 11 ) can also be achieved by a logic circuit (hardware) incorporated in an integrated circuit (i.e., an IC) or by software.
- a logic circuit hardware incorporated in an integrated circuit (i.e., an IC) or by software.
- the printer 1 may include a computer configured to executes programs realizing respective functions.
- the computer includes, for example, one or more processors and a non-transitory computer-readable recording medium storing the programs.
- the processor(s) reads out the programs from the recording medium and executes the same, the desired function(s) is achieved.
- a CPU may be used.
- non-transitory and tangible medium such as a ROM, a tape, a disk, a recording card, a semiconductor memory, a programmable logic circuit and the like may be used.
- a RAM for developing the programs may further be provided.
- the program(s) may be provided to the computer via an arbitrary transmission medium capable of transmitting the program(s) (e.g., a communication network or a broadcasting wave).
- the programs may be realized electrically (e.g., in the form of a data signal incorporated into a carrier wave.
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Record Information Processing For Printing (AREA)
Abstract
Description
- This application claims priority under 35 U.S.C. § 119 from Japanese Patent Application No. 2020-063813 filed on Mar. 31, 2020. The entire subject matter of the application is incorporated herein by reference.
- The present disclosures relate to a printing apparatus configured to create raster data using fonts stored in the printing apparatus when printing is performed based on print data described in a page-description language. The present disclosures also relate to a printing method applicable to such a printing apparatus and a non-transitory computer-readable recording medium storing instructions realizing such a method.
- The print data described in the page-description language includes various information such as drawing information of graphics, font information for characters, printing position information for characters and glyph width information which indicates a width from an origin of a character to the origin of a next character for each character. In addition, the print data also includes commands. Typically, the printing apparatus employs a RIP (Raster Image Processor) which is configured to analyze the commands included in the print data and create the raster data. The printing apparatus then prints images based on the thus created raster data. In the following description, the processes performed by the RIP will be referred to as a RIP process.
- The printing apparatus generally stores font information therein. When the print data does not include font information for characters, the printing apparatus selects one of the fonts the printing apparatus stores as a substitute font and creates the raster data such that each character in the substitute font is arranged within a glyph width which is designated and assigned to the character by the print data. In particular, when the glyph width for the character of the substitute font is larger than a glyph width designated and assigned to the character by the print data, the printing apparatus creates the raster data by reducing a size of the character expressed by the substitute font such that the glyph width of the substitute font is arranged within the glyph width designated by the print data.
- As one example of the font, there has been known a fixed-width font which has a fixed width for any character. In the fixed-width font, the glyph width for the character having a relatively small width such as “I” has the same glyph width for the character having a relatively larger width such as “W” by adding blank spaces around the glyph having the small width.
- In the above-described conventional printing apparatus, when the fixed-width font is selected as the substitute font and the glyph width for the character “I” expressed by the fixed-width font is wider than the glyph width designated by the print data, the glyph width expressed by the fixed-width font for the character “I” is reduced so that the glyph width expressed by the fixed-width font for the character “I” is equal to or less than the glyph width designated by the print data. In such a case, the character “I” itself is excessively reduced due to the blank spaces added around the character “I” and printed onto a printing sheet in an unnatural shape.
- According to aspects of the present disclosures, there is provided a printing apparatus which is provided with a controller configured to perform a RIP process of analyzing print data and create raster data based on print data, the print data being configured such that a target character and a glyph width for each character are described in a page description language, the glyph width being defined as a distance between an origin of the target character and an origin of a character next to the target character, the target character being arranged within the glyph width designated by the print data in creating the raster data, a printing device configured to print an image based on the raster data, and a storage device configured to store fixed-width font information in which a fixed width is assigned to each character. When the fixed-width font is determined to be used as a substitute font for the target character and when the glyph width of the target character is smaller than the fixed width and the glyph width of the target character is larger than the width of the bounding box of the glyph of the target character expressed by the fixed-width font, the controller is further configured to arrange, in the RIP process, the target character expressed by the fixed-width font such that the width of the bounding box is arranged within the glyph width.
- According to aspects of the present disclosures, there is provided a printing apparatus, provided with a controller configured to perform a RIP process of analyzing print data and create raster data based on print data, the print data being configured such that a target character and a glyph width for each character are described in a page description language, the glyph width being defined as a distance between an origin of the target character and an origin of a character next to the target character, the target character being arranged within the glyph width designated by the print data in creating the raster data, a printing device configured to print an image based on the raster data, and a storage device configured to store fixed-width font information in which a fixed width is assigned to each character and a proportional font in which different widths are assigned to respective characters. When one of the fixed-width font and the proportional font is determined to be used as a substitute font for the target character, the controller is further configured to perform, in the RIP process, when the glyph width of the target character is equal to a width of the target character expressed by the determined one of the fixed-width font and the proportional font, arranging the target character expressed by the determined one of the fixed-width font and the proportional font so that the width of the target character expressed by the determined one of the fixed-width font and the proportional font coincides with the glyph width, when the glyph width of the target character is larger than the width of the target character expressed by the determined one of the fixed-width font and the proportional font, arrange the target character expressed by the determined one of the fixed-width font and the proportional font such that the width of the target character expressed by the determined one of the fixed-width font and the proportional font is within the glyph width, when the glyph width of the target character is smaller than the width of the target character expressed by the determined one of the fixed-width font and the proportional font, and the determined one of the fixed-width font and the proportional font is the proportional font, arranging the target character expressed by the proportional font by reducing so that a reduced width of the target character expressed by the proportional font is within the glyph width, when the glyph width of the target character is smaller than the width of the target character expressed by the determined one of the fixed-width font and the proportional font, the determined one of the fixed-width font and the proportional font is the fixed-width font, and the glyph width of the target character is equal to or smaller than a width of a bounding box of the glyph of the target character expressed in the fixed-width font, arranging the target character expressed by the fixed-width font so that the fixed width of the target character coincides with the glyph width, and when the glyph width of the target character is smaller than the width of the target character expressed by the determined one of the fixed-width font and the proportional font, the determined one of the fixed-width font and the proportional font is the fixed-width font, and the glyph width of the target character is larger than the width of the bounding box of the glyph of the target character expressed in the fixed-width font, arranging the target character expressed by the fixed-width font so that the width of the bounding box is within the glyph width.
- According to aspects of the present disclosures, there is provided a printing method, which includes performing a RIP process of analyzing print data and create raster data based on print data, the print data being configured such that a target character and a glyph width for each character are described in a page description language, the glyph width being defined as a distance between an origin of the target character and an origin of a character next to the target character, the target character being arranged within the glyph width designated by the print data in creating the raster data, and printing an image based on the raster data. When a fixed-width font is determined to be used as a substitute font for the target character and when the glyph width of the target character is smaller than the fixed width and the glyph width of the target character is larger than the width of the bounding box of the glyph of the target character expressed by the fixed-width font, the method further comprises arranging the target character expressed by the fixed-width font such that the width of the bounding box is arranged within the glyph width.
- According to aspects of the present disclosures, there is provided a non-transitory computer-readable recording medium for a printing apparatus having a controller, the recording medium storing computer-executable instructions which cause, when executed by the controller, the printing apparatus to perform a RIP process of analyzing print data and create raster data based on print data, the print data being configured such that a target character and a glyph width for each character are described in a page description language, the glyph width being defined as a distance between an origin of the target character and an origin of a character next to the target character, the target character being arranged within the glyph width designated by the print data in creating the raster data, and print an image based on the raster data. When a fixed-width font is determined to be used as a substitute font for the target character and when the glyph width of the target character is smaller than the fixed width and the glyph width of the target character is larger than the width of the bounding box of the glyph of the target character expressed by the fixed-width font, the instructions further causes, when executed by the controller, the printing apparatus to arrange the target character expressed by the fixed-width font such that the width of the bounding box is arranged within the glyph width.
-
FIG. 1 is a block diagram illustrating a brief configuration of a printer according to an embodiment of the present disclosures. -
FIG. 2 illustrates definitions of a bounding box, a bounding box width, and a glyph width. -
FIGS. 3A-3C show an example when a substitute font is a proportional font according to conventional art. -
FIGS. 4A-4C show an example when a substitute font is a fixed-width font according to conventional art. -
FIG. 5 shows a flowchart illustrating a RIP process performed by the printer shown inFIG. 1 . -
FIG. 6 shows a flowchart illustrating an analyzing process to analyze a font selecting operator. -
FIG. 7 shows a flowchart illustrating an analyzing process to analyze a character drawing operator. -
FIGS. 8A-8C show an example of a position compensating process performed in the analyzing process shown inFIG. 7 . -
FIGS. 9A-9C show an example of a position compensating process performed in the analyzing process shown inFIG. 7 . -
FIGS. 10A-10C show an example of a scaling process performed in the analyzing process shown inFIG. 7 . - Hereinafter, referring to the accompanying drawings, an embodiment according to aspects of the present disclosures will be described.
- 1. Schematic Configuration of Printer
-
FIG. 1 is a block diagram illustrating a schematic configuration of aprinter 1. Theprinter 1 is an example of a printing apparatus according to aspects of the present disclosures. - As shown in
FIG. 1 , theprinter 1 is connected to anexternal device 2. Theprinter 1 is configured to print images on a printing sheet based on an instruction from theexternal device 2. One example of theexternal device 2 is a host computer. - The
printer 1 includes acontroller 11, aninput device 12, aprogram storage 13, afont storage 14, adisplay device 15, aprinting device 16, and asheet feeder 17. - The
input device 12 is configured to receive, from a user, various instructions directed to theprinter 1. Theprogram storage 13 is configured to store control programs executed by thecontroller 11. Thefont storage 14 is configured to store substitute fonts used by theprinter 1. A fixed-width font and a proportional font are available as the substitute fonts. Thedisplay device 15 is configured to display various screens under control of thecontroller 11. theprinting device 16 is configured to print characters and/or images based on print data and instructions received from theexternal device 2, on the printing sheet supplied from thesheet feeder 17. Thesheet feeder 17 is configured to supply the printing sheets one by one to theprinting device 16. - According to the present disclosures, the print data has a PDF file format. In the PDF data, images are described according to a page-description language based on PostScript®. The page-description language does not need to be limited to the PostScript, but PCL® or LIPS® can also be used as the page-description language.
- In the print data, a plurality of operators for drawing character strings, graphics and/or images are described in order of processing. The operators indicate, for example, a font assignment, a glyph which represents a character shape, a drawing position of the glyph, a glyph size and the like. The
controller 11 is configured to analyze the operator to determine a glyph width, which represents a distance between two adjacent glyph origins (seeFIG. 2 ). In other words, the glyph width is equal to a width of a body corresponding to the character “g” in a certain font. - Bounding Box, Bounding Box Width, and Glyph Width
- Referring to
FIG. 2 , a bounding box of the glyph, a bounding box width of the glyph, and the glyph width will be described using a lower-case alphabet “g” as an example of the glyph. It is noted that a graphical representation of the lower-case “g” is the glyph, and a rectangle externally contacts the glyph “g” is a bounding box of the glyph. A width of the bounding box is referred to as a bounding box width. The glyph width is a distance between the glyph origin of the glyph of interest and a next glyph origin, which is the glyph origin of a glyph next to the glyph of interest (i.e., “g”). It is noted that the bounding box width represents a width of a character, while the glyph width defines a width of an area of the character and is slightly wider than the bounding box width. - The
printer 1 performs the RIP process in which the PDF data is converted to the raster data. The RIP process includes an analyzing process in which the multiple operators in the PDF data are analyzed successively, a creating process in which drawing objects obtained in the analyzing process such as character strings, graphics and/or images are successively arranged in an image space for one page, and a writing process in which the one page of image created in the creating process is written in a storage (not shown) as the raster data. Theprinter 1 is configured to print an image represented by the raster data created in the RIP process on the printing sheet with use of theprinting device 16. - The operators regarding the drawing of the glyph of the character in the PDF data designates, for one character or one character string, a font name, a font type, an attribution such as italic or bold, and a fixed-width font (non-proportional font) or a proportional font.
- There are cases where font information necessary to draw the glyph designated by the operator is incorporated in the PDF data, and where the font information necessary to draw the glyph designated by the operator is not incorporated in the PDF data. It is noted that the font information may be a program for drawing the glyph.
- 2. When Font Information is Incorporated in PDF Data
- When the font information necessary to draw the glyph designated by the operator is incorporated in the PDF data, the
controller 11 draws the glyph at a particular position in the image space for one page using the font information incorporated in the PDF data when executing the RIP process. The image space for one page is finally written out as the raster data. - 3. When Font Information is not Incorporated in PDF Data
- Next, a case where the font information is not incorporated in the PDF data will be described. Firstly, a conventional art will be briefly described with reference to
FIGS. 3 and 4 . - 3-1. Proportional Font
-
FIG. 3A schematically shows an example in which an operator in the PDF data designates a proportional font, but the PDF data does not contain font information of the designated proportional font, andcontroller 11 selects another proportional font as the substitute font. In this example, by analyzing operators included in the PDF data and designating the characters, the glyph origins G1, G2, G3 and G4 are determined. Further, by analyzing the operators included in the PDF data and designating the characters, it is determined that (a) a glyph of a character “A” is drawn within a glyph width W11 between the glyph origins G1 and G2, a glyph of a character “I” is drawn within a glyph width W12 between the glyph origins G2 and G3, and a glyph of a character “B” is drawn within a glyph width W13 between the glyph origins G3 and G4. It is noted that, in the following description, when the glyph widths W11, W12 and W13 are collectively referred to, a term “glyph widths W1” will be used. - When the designated font information is not incorporated in the PDF data, glyphs of the characters “A,” “I,” and “B” cannot be drawn based only on the PDF data.
FIG. 3A shows this state such that the glyphs of the characters “A,” “I,” and “B” are not shown, but only the glyph width W11, W12 and W13 are indicated as widths for blank spaces. -
FIG. 3B illustrates an example of glyphs MP1, MP2 and MP3 of a proportional font stored in thefont storage 14 as a substitute font. It is noted that when the glyphs MP1, MP2 and MP3 are collectively referred to, a term “glyphs MP” will be used. InFIG. 3B , the glyphs MP1, MP2 and MP3 expressed by the proportional font represent characters “A,” “I,” and “B,” respectively. Regarding the glyph MP of the proportional font, the glyph widths W21, W22 and W23 are different depending on the characters. It is noted that when the glyph widths W21, W22 and W23 are collectively referred to, a term “glyph widths W2” will be used. - The
font storage 14 stores glyph information of the proportional font as information of respective character shapes. It is noted that the origins G01, G02 and G03 represent the origins of the glyphs MP1, MP2 and MP3 of the proportional font, respectively. -
FIG. 3C illustrates a case where the glyphs MP (seeFIG. 3B ) of the proportional font stored in thefont storage 14 are arranged at particular positions in the image space for one page designated by the PDF data. - When the glyph of the character “A,” which is the glyph MP1 of the proportional font, is to be drawn within the glyph width W11 between the glyph origins G1 and G2, the
controller 11 draws the glyph MP1 expressed by the proportional font in the image space for one page with respect to the origin O1. In this case, the glyph width W11, which is a distance between the glyph origins G1 and G2, is larger than the glyph width W21 of the substitute font. Therefore, the origin O1 is determined in accordance with the following equation. -
Origin O1=glyph origin G1+(glyph width W11−glyph width W21)/2 - It is noted that the origin O1, which is determined based on the above equation, is a position in an X direction with respect to the glyph origin G1.
- With regard to the glyph MP2 of the proportional font, since the glyph width W12 is larger than the glyph width W22, similarly to the glyph MP1 of the proportional font, the
controller 11 draws the glyph MP2 of the proportional font in the image space for one page with respect to the origin O2. The origin O2 is determined in accordance with the following equation, in a similar way to the origin O1. -
Origin O2=glyph origin G2+(glyph width W12−glyph width W22)/2 - Further, with regard to the glyph MP3 of the proportional font, since the glyph width W13 is larger than the glyph width W23, the
controller 11 draws the glyph MP3 of the proportional font in the image space for one page with respect to on the origin O3. The origin O3 is determined in accordance with the following equation. -
Origin O3=glyph origin G3+(glyph width W13−glyph width W23)/2 - If the glyph width W1 is smaller than the glyph width W2, the
controller 11 reduce the glyph MP in the X direction so that the glyph width W2 is reduced (hereinafter, such an operation will be described as “reducing the glyph width W2 in the X direction”), before drawing the glyph MP expressed by the proportional font in the image space for one page with respect to the glyph origin G1. Concretely, thecontroller 11 reduces the glyph width W2 in the X direction so that the reduced glyph width W2 is equal to or less than the glyph width W1. In this case, it is desirable that thecontroller 11 reduces the glyph width W2 in the X direction so that the reduced glyph width W2 coincides with the glyph width W1. - 3-2. Fixed-Width Font
-
FIG. 4A shows a case where the operator in the PDF data designates a proportional font, but the PDF data does not include the font information of the designated proportional font, and thecontroller 11 selects a fixed-width font as the substitute font (FIGS. 4B and 4C ). The glyph origins G1, G2, G3 and G4 can be determined by analyzing operators included in the PDF data and designating characters. Further, based on the operators included in the PDF data and designating the characters, a glyph of a character “A” is to be drawn within a glyph width W11 between the glyph origins G1 and G2, a glyph of a character “I” is to be drawn within a glyph width W12 between the glyph origins G2 and G3, and a glyph of a character “B” is to be drawn within a glyph width W13 between the glyph origins G3 and G4. - When the PDF data does not include the font information, the glyphs of “A,” “I” and “B” cannot be drawn. Therefore, in
FIG. 4A , each of the glyph widths W11, W12 and W13 are illustrated as blank areas without drawing the glyphs of the characters “A,” “I” and “B.” -
FIG. 4B illustrates an example of glyphs MT1, MT2 and MT3 of a target character expressed by the fixed-width font stored in thefont storage 14 as a substitute font. It is noted that, when collectively referred to, the glyphs MT1, MT2 and MT3 will be referred to as the “glyphs MT of the target character expressed by the fixed-width font.” InFIG. 4B , the glyphs MT1, MT2 and MT3 of characters expressed by the fixed-width font represent the characters “A,” “I” and “B,” respectively. As shown inFIG. 4B , glyph widths W21, W22 and W23 are the same regardless of the characters. It is noted that the origins G01, G02 and G03 represent origins of the glyphs MT1, MT2 and MT3 expressed by the fixed-width font. -
FIG. 4C illustrates a case where the glyphs MT of the character expressed by the fixed-width font stored in the font storage 14 (seeFIG. 4B ) as the substitute font are arranged at particular positions designated by the PDF data in an image space for one page. - When the glyph widths W1 are larger than the glyph widths W2, according to a conventional configuration, a process similar to the process described above using the proportional font as the substitute font is performed even though the glyphs MT of characters expressed by the fixed-width font are used. In the example shown in
FIG. 4C , the glyph width W11 is larger than the glyph width W21 with regard to the glyph of the character “A.” When the glyph of the character “A” is to be drawn within the glyph width W11, thecontroller 11 draws the glyph of the character “A” in the image space for one page with respect to the origin O1. The origin O1 is determined in accordance with the following equation. -
Origin O1=glyph origin G1+(glyph width W11−glyph width W21)/2 - It is noted that the origin O1 in the above equation is a position of the origin O1 in the X direction with respect to the glyph origin G1.
In the example shown inFIG. 4C , the glyph width W13 is also larger than the glyph width W23 with regard to the glyph of the character “B.” Therefore, according to the conventional configuration, thecontroller 11 draws the glyph of the character “B” similarly as the glyph of the character “A” is drawn. - Meanwhile, regarding the glyph of the character “I,” in the example of
FIG. 4C , the glyph width W12 is smaller than the glyph width W22. In this case, according to the conventional configuration, the process similar to the process using the proportional font as the substitute font is performed when the substitute font is the fixed-width font. Thecontroller 11 reduces the glyph width W22 in the X direction, and thecontroller 11 draws the glyph of the character “I” in the image space for one page with respect to the glyph origin G1. - Regarding the glyph MT2 of the character “I” expressed by the fixed-width font, sine the width of the glyph is small, spaces are added around the glyph so that a glyph width of the character “I” have the glyph width W22 which is the same glyph width of the other characters (e.g., “W”) expressed by the fixed-width font. According to the conventional configuration, the
controller 11 draws the glyph of character “I” in the image space for one page by reducing the glyph width W22 in the X direction so that the reduced glyph width W22 is equal to or less than the glyph width W12. -
FIG. 4C shows a state where the character “I” is reduced in the x-direction excessively due to the blank spaces around the glyph of character “I” expressed by the fixed-width font. When theprinting device 16 of theprinter 1 performs a printing process to print the raster image created in the RIP process on the printing sheet as shown inFIG. 4C , the characters for which the fixed-width font is used as the substitute font are printed, by theprinting device 16, unnaturally (e.g., in a manner reduced excessively). - In order to decrease the possibility of such an excessive reduction of the character “I” as shown in the example of character “I” in
FIG. 4C according to the conventional art, thecontroller 11 according to the present embodiment performs the RIP process shown inFIGS. 5, 6 and 7 . It is noted that the character “I” for which the fixed-width font is selected as the substitute font is an example of the target character. - 4. Operation of Printer
-
FIG. 5 is a flowchart illustrating the RIP process,FIG. 6 is a flowchart illustrating the process of analyzing the font selecting operator, andFIG. 7 is a flowchart illustrating the process of analyzing the character drawing operator, which are performed by thecontroller 11. - When the
printer 1 prints the PDF data received from theexternal device 2, thecontroller 11 performs the RIP process shown inFIG. 5 . The RIP process includes the process of analyzing the font selecting operator shown inFIG. 6 , the process of analyzing the character drawing operator shown inFIG. 7 , and processes of analyzing other operators. Thecontroller 11 converts the PDF data to the printable raster data by performing the above processes. - 4-1. RIP Process
- In the RIP process, the
controller 11 performs the process of analyzing the operators as shown inFIG. 5 . - The PDF data includes multiple operators such as operators designating images, graphics such as a circle and a square, and/or operators describing texts. The
controller 11 starts the RIP process to sequentially detect the operators constituting the PDF data from among multiple operators (S11). - The operators include the character drawing operator, the font selecting operator, and other operators. It is noted that the other operators are the operators designating drawing objects of the images, graphics such as a circle and a square, and perform operations of temporarily writing the drawing objects of the images, graphics such as a circle and a square in a storage of a work area (not shown).
- When the detected operator is one of the other operators (S12: “OTHER”), the
controller 11 performs the analyzing process of the detected one of the other operators (S13). When the detected operator is the font selecting operator (S12: “FONT SELECTING OPERATOR”), thecontroller 11 performs the process of analyzing the font selecting operator (S14). When the detected operator is the character drawing operator (S12: “CHARACTER DRAWING OPERATOR”), thecontroller 11 performs the process of analyzing the character drawing operator (S15). According to the present embodiment, thecontroller 11 performs the process of analyzing the font selecting operator (FIG. 6 ) and the process of analyzing the character drawing operator (FIG. 7 ) in this order. - When the
controller 11 completes the analyzing processes of all of the operators of the PDF data (S16: YES), thecontroller 11 combines the drawing objects of the images, graphics and/or the characters which have been stored, for all the operators, in the storage of the work area (not shown) as the image space for one page, and stores the combined data in the storage (not shown) as the raster data. Then, thecontroller 11 terminates the RIP process. Until the processes for analyzing all the operators included in the PDF data are completed (S16: NO), thecontroller 11 repeats S11 to S15. - 4-2. Process of Analyzing Font Selecting Operator
- As shown in
FIG. 6 , when the operator is the font selecting operator, thecontroller 11 analyzes a font dictionary included in the PDF data (S21) and determines whether the font information corresponding to the font designated by the font selecting operator is included in the PDF data (S22). When the font information is included in the PDF data (S22: YES), thecontroller 11 selects the font information designated by the font selecting operator (S23). When the font information is not included in the PDF data (S22: NO), thecontroller 11 selects the substitute font stored in the font storage 14 (S24). In this case, thecontroller 11 selects one of the substitute fonts, i.e., one of the fixed-width font and the proportional font, based on a condition of glyphs (e.g., character shapes) or the like. - 4-3. Process of Analyzing Character Drawing Operator
- In the following description, the glyph width of the glyph designated in the PDF data is referred to as “designated glyph width W1,” the glyph width of the glyph drawn by using the substitute font is referred to as “drawing glyph width W2,” and the width of the bounding box of the glyph drawn by using the substitute font is referred to as “Bounding box Width W3.” When the selected font for drawing characters is the substitute font, the drawing glyph width W2 is a width assigned to a target character, or the width of the character when the substitute font is used.
- As shown in
FIG. 7 , the analyzing process of the character drawing operator varies depending on whether the font used for drawing a target PDF data selected in the analyzing process of the font selecting operator is a font corresponding to the font information of the target PDF data or the substitute font. - In the analyzing process of the character drawing operator, the
controller 11 obtains the drawing character code (S31). When the selected font is not the substitute font (S32: NO), i.e., when the selected font is the font corresponding to the font information of the target PDF data, thecontroller 11 draws, using the font information, the glyph indicated by the drawing character code in the storage of the work area (not shown) as usual (S33), and terminates the process. - On the other hand, when the selected font is the substitute font (i.e., the fixed-width font or the proportional font) (S32: YES), the
controller 11 calculates the designated glyph width W1 and the drawing glyph width W2 (S34). Regarding data representing the designated glyph width W1, thecontroller 11 analyzes the dictionary included in the PDF data, and obtains data corresponding to the drawing character code from the dictionary included in the PDF data. Regarding the drawing glyph width W2, thecontroller 11 obtains a glyph width of the designated one of substitute fonts thefont storage 14 stores and corresponding to a character designated by the drawing character code. In this case, the drawing glyph width W2 is a width assigned to the designated substitute font corresponding to the character. When the substitute font is the fixed-width font, the drawing glyph width W2 has a fixed width, while, when the substitute font is the proportional font, the drawing glyph width W2 has a different width assigned to each character. - Next, the
controller 11 compares the designated glyph width W1 with the drawing glyph width W2 (S35). When the designated glyph width W1 is equal to the drawing glyph width W2 (S35: YES), thecontroller 11 draws the glyph designated by the drawing character code in the storage of the work area (not shown) without compensating the substitute font (S36), and terminates the process. That is, in step S36, thecontroller 11 arranges the target character in the designated substitute font such that the drawing glyph width W2 coincides with the designated glyph width W1. - When the
controller 11 compares the designated glyph width W1 with the drawing glyph width W2, and if the designated glyph width W1 is not equal to the drawing glyph width W2 (S35: NO), but the designated glyph width W1 is larger than the drawing glyph width W2 (S37: YES), thecontroller 11 performs a position compensating process to compensate the position of the target character in the substitute font, draws the glyph indicated by the drawing character code (S38), and terminates the process. -
FIGS. 8A-8C illustrate an example of the position compensating process (S38) which is performed by thecontroller 11 when the designated glyph width W1 is larger than the drawing glyph width W2.FIG. 8A schematically shows a case where the operator included in the PDF data designates the fixed-width font, but the PDF data does not have include the font information of the fixed-width font. The process illustrated inFIG. 8A is similar to that in a case where the glyph width W1 is larger than the glyph width W2 shown inFIGS. 3 and 4 . - As shown in
FIG. 8A , the glyph origin G1 and the glyph origin G2 are defined by the PDF data. Further, an operator designating a character included in the PDF data designates that a glyph of a character “C” is to be drawn within the designated glyph width W1. When the font information is not included in the PDF data, thecontroller 11 cannot draw the glyph of the character “C,” the designated glyph width W1 is illustrated as a blank space without drawing the glyph of character “C” inFIG. 8A , similarly to cases shown inFIGS. 3A and 4A . -
FIG. 8B illustrates an example of a glyph MT4 of a character expressed by the fixed-width font stored in thefont storage 14 as the substitute font. InFIG. 8B , the glyph MT4 shows the character “C” expressed by the fixed-width font. -
FIG. 8C schematically illustrates a case where the glyph MT4 of the character “C” expressed by the fixed-width font stored in thefont storage 14 as the substitute font (seeFIG. 8B ) is drawn at a particular position in the image space for one page designated by the PDF data. - Returning to
FIG. 7 , when the glyph of character “C” is to be drawn within the designated glyph width W1, thecontroller 11 draws, in S38, the glyph of character “C” in the image space for one page with respect to the origin O1. At this stage, since the designated glyph width W1 is larger than the drawing glyph width W2, a position of the origin O1 is determined in accordance with the equation below. -
Origin O1=Glyph Origin G1+(designated glyph width W1−drawing glyph width W2)/2 - In this way, the
controller 11 performs the position compensating process. - It is noted that the same process is performed in the position compensating process (S38) regardless of whether the substitute font is the fixed-width font or the proportional font since the designated glyph width W1 is larger than the drawing glyph width W2.
- It is noted that, when the determination in S35 is “YES” and when the determination in S37 is “YES,” it is unnecessary for the
controller 11 to calculate the bounding box width W3 of the glyph of the character “C” in S41. Therefore, in such a case, thecontroller 11 can perform the RIP process quickly to the extent that it is no longer necessary to calculate the bounding box width W3. It is noted that each of the cases where the determination in S35 is “YES” and the case where the determination in S37 is “YES” is included in a case where the designated glyph width W1 is equal to or larger than the drawing glyph width W2. - When the designated glyph width W1 is not larger than the drawing glyph width W2 (S37: NO) and the substitute font to be used is the proportional font (S39: YES), the
controller 11 performs a scaling process described below and draws the glyph indicated by the drawing character code (S40), and terminates the process. - In the scaling process in S40, the
controller 11 reduces the drawing glyph width W2 in the X direction so that the drawing glyph width W2 is equal to or smaller than the designated glyph width W1 (i.e., a character having the drawing glyph width W2 is reduced in the X direction so that the reduced drawing glyph width W2 is equal to or less than the designated glyph width W1), thereby the character being drawn in the image space for one page. - When the substitute font to be used is not the proportional font but the fixed-width font (S39: NO), the
controller 11 calculates the bounding box width W3 of the glyph of the character expressed by the fixed-width font (S41). - Next, the
controller 11 compares the designated glyph width W1 with the bounding box width W3. When the designated glyph width W1 is larger than the bounding box width W3 (S42: YES), thecontroller 11 performs the position compensating process to compensate the position of the glyph expressed by the fixed-width font, draws the glyph indicated by the drawing character code (S43), and terminates the process. -
FIGS. 9A-9C illustrate the position compensating process (S43) performed by thecontroller 11 when the substitute font is the fixed-width font and the designated glyph width W1 is larger than the bounding box width W3. -
FIG. 9B illustrates an example of the glyph MT4 expressed by the fixed-width font stored as the substitute font in thefont storage 14. InFIG. 9B , the glyph MT4 expressed by the fixed-width font indicates the character “C.” ComparingFIG. 9A withFIG. 9B , it is understood that the designated glyph width W1 is smaller than the drawing glyph width W2. Therefore, when the position compensating process shown inFIG. 4C is performed, the width of the character “C” is reduced excessively. More concretely, when the drawing glyph width W2 is reduced in the X direction so that the character “C” having the drawing glyph width W2 is arranged within the designated glyph width W1, the character “C” is reduced excessively due to the blank spaces around the glyph of the character “C.” - Returning to S43, the
controller 11 draws the glyph of the character “C,” which is the glyph MT4 expressed by the fixed-width font within the designated glyph width W1. Concretely, thecontroller 11 draws the glyph of the character “C,” which is the glyph MT4 expressed by the fixed-width font, in the image space for one page with respect to the origin O1 (S43). - In this case, a position of the origin O1 is determined in accordance with the following equation:
-
Origin O1=glyph origin G1+(designated glyph width W1−drawing glyph width W2)/2 - The position of the origin O1 is an offset position which is offset from the glyph origin G1 in a direction opposite to the X direction. In this case, a part of the drawing glyph width W2 overlaps a part of the designated glyph width of an adjacent glyph on the glyph origin G1 side viewed from the character “C.” Further, a part of the drawing glyph width W2 also overlaps a part of the designated glyph width of an adjacent glyph on the glyph origin G2 side viewed from the character “C.” It is noted that the drawing glyph width W2 and the designated glyph width of an adjacent glyph on the glyph origin G1 side viewed from the character “C” overlap by the above-described offset amount.
- In the position compensating process in S43, the
controller 11 arranges the character “C” such that a center of the designated glyph width W1 coincides with a center of the drawing glyph width W2, as a consequence. Since the designated glyph width W1 is larger than the bounding box width W3, it is unnecessary to reduce the character width of the character “C” in the position compensating process in S43. - When the designated glyph width W1 is equal to or smaller than the bounding box width W3 (S42: NO), it is necessary to reduce the character width of the character “C” and therefore the
controller 11 performs the scaling process below, then draws the glyph (S44) and terminates the process. -
FIGS. 10A-10C illustrate the scaling process (S44) performed by thecontroller 11 when the substitute font is the fixed-width font and the designated glyph width W1 is equal to or smaller than the bounding box width W3.FIG. 10A shows a case where an operator included in the PDF data designates the fixed-width font, but the PDF data does not include the font information of the fixed-width font. - As shown in
FIG. 10A , the glyph origin G1 and the glyph origin G2 are defined by the PDF data. Further, by the operator designating the character in the PDF data, it is defined that a glyph of the character “C” is drawn within the designated glyph width W1. When the font information is not included in the PDF data, the glyph of the character “C” cannot be drawn. Therefore, the designated glyph width W1 is expressed as a blank space without drawing the glyph of character “C” inFIG. 10A , as is described referring to the examples shown inFIGS. 3A and 4A . -
FIG. 10B illustrates an example of a fixed-width font stored in thefont storage 14 as the substitute font.FIG. 10B shows the character “C” expressed by the fixed-width font. -
FIG. 10C schematically illustrates a case where the glyph of character “C” expressed by the fixed-width font stored in thefont storage 14 as the substitute font shown inFIG. 10B is arranged, inFIG. 10A , at a particular position in an image space for one page designated by the PDF data. - In the scaling process in S44, the
controller 11 reduces the drawing glyph width W2 in the X direction so that the character “C” having the drawing glyph width W2 is arranged within the designated glyph width W1, and draws the reduced glyph in the image space for one page. According to an example shown inFIG. 10C , thecontroller 11 reduces the drawing glyph width W2 so that the reduced drawing glyph width W2 coincides with the designated glyph width W1. - In the above-described process of the
controller 11, for the same characters that have been processed once, the previous process is applied to the same characters, and the controller does not perform the same process again. - In addition, the
printer 1 may be connected to a server, and the above-described processes performed by thecontroller 11 of theprinter 1 may be performed by the server. In such a case, theprinter 1 sends the input PDF data to the server, and theprinter 1 receives, from the server, a result of the process which is equivalent to the process thecontroller 11 would apply to the input PDF data, and performs the printing. - 5. Example of Software Implementation
- A control block of the printer 1 (especially the controller 11) can also be achieved by a logic circuit (hardware) incorporated in an integrated circuit (i.e., an IC) or by software.
- In the latter case (i.e., by software), the
printer 1 may include a computer configured to executes programs realizing respective functions. The computer includes, for example, one or more processors and a non-transitory computer-readable recording medium storing the programs. As the processor(s) reads out the programs from the recording medium and executes the same, the desired function(s) is achieved. As the processor(s), a CPU may be used. As the “non-transitory and tangible medium” medium such as a ROM, a tape, a disk, a recording card, a semiconductor memory, a programmable logic circuit and the like may be used. A RAM for developing the programs may further be provided. It is noted that the program(s) may be provided to the computer via an arbitrary transmission medium capable of transmitting the program(s) (e.g., a communication network or a broadcasting wave). According to aspects of the present disclosures, the programs may be realized electrically (e.g., in the form of a data signal incorporated into a carrier wave. - It is noted that the above-mentioned configurations do not need to be limited to the above-described examples. The above-mentioned configurations can be modified in various ways without departing from aspects of the present disclosures. It is also possible that technical features disclosed above in different embodiments and modifications may be suitably combined. Such combinations are also included within aspects of the present disclosures.
Claims (18)
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020063813A JP7371558B2 (en) | 2020-03-31 | 2020-03-31 | Printing device, printing method and program |
JP2020-063813 | 2020-03-31 | ||
JPJP2020-063813 | 2020-03-31 |
Publications (2)
Publication Number | Publication Date |
---|---|
US20210303945A1 true US20210303945A1 (en) | 2021-09-30 |
US11386309B2 US11386309B2 (en) | 2022-07-12 |
Family
ID=77856092
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US17/130,000 Active US11386309B2 (en) | 2020-03-31 | 2020-12-22 | Printing apparatus, printing method, and non-transitory computer-readable recording medium therefor |
Country Status (2)
Country | Link |
---|---|
US (1) | US11386309B2 (en) |
JP (1) | JP7371558B2 (en) |
Family Cites Families (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05281946A (en) * | 1992-03-31 | 1993-10-29 | Canon Inc | Method and device for character output |
JPH1095144A (en) * | 1996-09-20 | 1998-04-14 | Hitachi Ltd | Document preparing apparatus |
US20050198566A1 (en) * | 2002-04-10 | 2005-09-08 | Kouichi Takamine | Content generator, receiver, printer, content printing system |
JP2004192236A (en) | 2002-12-10 | 2004-07-08 | Canon Inc | Method and device for processing layout correction and storage medium for storing method and device thereof |
US20040125107A1 (en) | 2002-12-26 | 2004-07-01 | Mccully Nathaniel M. | Coordinating grid tracking and mojikumi spacing of Japanese text |
US7123261B2 (en) | 2002-12-26 | 2006-10-17 | Adobe Systems Incorporated | Coordinating grid tracking and mojikumi spacing of Japanese text |
KR100661173B1 (en) | 2005-10-18 | 2006-12-26 | 삼성전자주식회사 | Print having a direct printing function and printing method thereof |
JP2007304764A (en) | 2006-05-10 | 2007-11-22 | Fuji Xerox Co Ltd | Image formation control data, printer, print server device, and print client device |
JP5248845B2 (en) * | 2006-12-13 | 2013-07-31 | キヤノン株式会社 | Document processing apparatus, document processing method, program, and storage medium |
JP4956366B2 (en) | 2007-10-16 | 2012-06-20 | キヤノン株式会社 | Image processing device |
JP5391956B2 (en) | 2009-09-15 | 2014-01-15 | セイコーエプソン株式会社 | RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM |
JP2011203692A (en) | 2010-03-26 | 2011-10-13 | Fuji Xerox Co Ltd | Document management device, document management system and document management program |
US8384918B2 (en) * | 2010-06-30 | 2013-02-26 | Konica Minolta Laboratory U.S.A., Inc. | Enforcing a minimum font size |
JP5900803B2 (en) * | 2013-09-18 | 2016-04-06 | コニカミノルタ株式会社 | DATA GENERATION DEVICE, DATA GENERATION PROGRAM, AND DATA GENERATION METHOD |
JP5729446B2 (en) | 2013-10-15 | 2015-06-03 | セイコーエプソン株式会社 | RECORDING DEVICE, RECORDING DEVICE CONTROL METHOD, AND PROGRAM |
CN104954605B (en) * | 2014-03-31 | 2018-02-06 | 京瓷办公信息系统株式会社 | Image processing system, image formation system and image forming method |
US20170161595A1 (en) | 2015-12-07 | 2017-06-08 | Xerox Corporation | Direct character recognition from page description language document |
US20210019366A1 (en) * | 2019-07-15 | 2021-01-21 | Relativity Oda Llc | Text Extraction Heuristics |
-
2020
- 2020-03-31 JP JP2020063813A patent/JP7371558B2/en active Active
- 2020-12-22 US US17/130,000 patent/US11386309B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
US11386309B2 (en) | 2022-07-12 |
JP2021160215A (en) | 2021-10-11 |
JP7371558B2 (en) | 2023-10-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8810853B2 (en) | Optimizing a line width of bar codes printed by variable printing | |
US20090195811A1 (en) | Method for printing text-only content of pdf documents | |
JP2018116442A (en) | Print control device, page data correction method, raster data generation method, page data correction program, and raster data generation program | |
US20130010325A1 (en) | Parallel rip processing for sheet images that include graphics defined by a job ticket | |
CN107728958B (en) | Method for improving printing quality of graphic elements | |
KR100396548B1 (en) | Apparatus for controlling printer to improve printing speed and method thereof | |
US8049905B2 (en) | Computer readable recording medium bearing a printer driver program and print data processing apparatus | |
US6430321B1 (en) | Text enhancement | |
KR100709364B1 (en) | Method and apparatus for generating pattern image | |
CN110196697B (en) | Information processing apparatus, information processing method, and storage medium | |
US11386309B2 (en) | Printing apparatus, printing method, and non-transitory computer-readable recording medium therefor | |
US8566703B2 (en) | Page description data processing apparatus, page description data processing method, and recording medium | |
US10582088B2 (en) | Information processing apparatus, method, and storage medium for causing printer driver to generate drawing command | |
US9712718B2 (en) | Image processing apparatus, image processing method, and storage medium | |
US8804141B2 (en) | Character output device, character output method and computer readable medium | |
US20170053196A1 (en) | Drawing command processing apparatus, drawing command processing method, and storage medium | |
JP4165408B2 (en) | Image forming apparatus and image forming program | |
US9978005B2 (en) | Printer for drawing bold character, method for controlling the same, and storage medium | |
US10241993B1 (en) | System and method for detecting reusable groups of drawing commands in a sequence of drawing commands | |
US20190311234A1 (en) | Information processing apparatus, method, and storage medium | |
US20190332906A1 (en) | Information processing apparatus, storage medium, printing apparatus, and method for processing drawing data | |
US9513852B2 (en) | Print instruction device, printing system, non-transitory computer readable medium, and print instruction method for increasing quality of a photographic image and read accuracy of a code image | |
US20080007741A1 (en) | Image processing setting device, image processing device, image forming system, image processing setting method, image processing method, and image forming method | |
US8756491B2 (en) | PDL data processing device | |
JP4581854B2 (en) | Image processing apparatus, image processing program, and image processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
FEPP | Fee payment procedure |
Free format text: ENTITY STATUS SET TO UNDISCOUNTED (ORIGINAL EVENT CODE: BIG.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY |
|
AS | Assignment |
Owner name: BROTHER KOGYO KABUSHIKI KAISHA, JAPAN Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:TABUSHI, CHIKA;REEL/FRAME:057225/0645 Effective date: 20210817 |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: NON FINAL ACTION MAILED |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: NOTICE OF ALLOWANCE MAILED -- APPLICATION RECEIVED IN OFFICE OF PUBLICATIONS |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT RECEIVED |
|
STCF | Information on status: patent grant |
Free format text: PATENTED CASE |