Method and apparatus for generating a font of which style is changeable
10061752 ยท 2018-08-28
Assignee
Inventors
Cpc classification
International classification
Abstract
A method and apparatus for generating a font of which style is changeable are disclosed. The disclosed method is a method for generating a font to be performed on an apparatus including a processor. The method comprises (a) setting a fixed style parameter which cannot change the style, wherein the fixed style parameter is included in style parameters, and a METAFONT consists of the style parameter and a letter drawing function, (b) generating an intermediate code based on the letter drawing function and the fixed style parameter; and (c) generating an output font by combining the intermediate code with a variable style parameter which can change the style, wherein the variable style parameter is included in the style parameter.
Claims
1. A method for generating a font based on a METAFONT consisting of a letter drawing function and a style parameter, the method performed by an apparatus including a processor, the method comprising: (a) setting a fixed style parameter, wherein the fixed style parameter is included in the style parameter and corresponds to an intrinsic frame of the font designed by a font producer, and a value of the fixed style parameter is not changed; (b) generating an intermediate code by inputting the fixed style parameter in the letter drawing function; and (c) generating an output font by combining the intermediate code with a variable style parameter, wherein the variable style parameter is included in the style parameter and is set by a request from a user, and a value of the variable style parameter is changed.
2. The method of claim 1, wherein in the step of (c), the intermediate code and the variable style parameter are combined by using a parameter mapping table.
3. The method of claim 1, wherein the intermediate code is an assembly code.
4. A non-transitory computer readable storage medium storing a program to perform a method for generating a font based on a METAFONT consisting of a letter drawing function and a style parameter, the method the method performed by an apparatus including a processor, the method comprising: (a) setting a fixed style parameter, wherein the fixed style parameter is included in the style parameter and corresponds to an intrinsic frame of the font designed by a font producer, and a value of the fixed style parameter is not changed; (b) generating an intermediate code by inputting the fixed style parameter in the letter drawing function; and (c) generating an output font by combining the intermediate code with a variable style parameter, wherein the variable style parameter is included in the style parameter and is set by a request from a user, and a value of the variable style parameter is changed.
Description
BRIEF DESCRIPTION OF DRAWINGS
(1) Example embodiments of the present invention will become more apparent by describing in detail example embodiments of the present invention with reference to the accompanying drawings, in which:
(2)
(3)
(4)
(5)
(6)
(7)
DETAILED DESCRIPTION
(8) In the present specification, an expression used in the singular encompasses the expression of the plural, unless it has a clearly different meaning in the context. In the present specification, terms such as comprising or including, etc., should not be interpreted as meaning that all the elements or operations are necessarily included. That is, some of the elements or operations may not be included, while other additional elements or operations may be further included. Also, terms such as unit, module, etc., as used in the present specification may refer to a part for processing at least one function or action and may be implemented as hardware, software, or a combination of hardware and software.
(9) Hereinafter, various embodiments of the invention will be described in detail with reference to accompanying drawings.
(10) Hereinafter, concept of METAFONT will be described as basics of the invention.
(11) The METAFONT corresponds to a font supplement system used in TeX, and consists of a letter drawing function of expressing a method of drawing every letter and a style parameter for making up a letter. That is, the method of drawing the letter is predetermined, but the style parameter (style value) for determining style is not determined. Accordingly, the METAFONT may freely change a font of the letter to desired style of a font by changing the style parameter.
(12)
(13) Particularly,
(14)
(15)
(16)
(17) For example, in usage of the METAFONT, when using a font having a thickness smaller than a font having default thickness, a style parameter for determining the thickness may be changed. A style parameter for determining a slope value may be changed when changing a slope of a letter.
(18) to which two style values are applied. Since diverse styles of fonts can be provided by using the METAFONT, the user may be highly satisfied.
(19) However, when generating the font depending on request of the user, the problem arises, that the conventional METAFONT performs all steps again in a font generation process from the beginning.
(20) The invention provides a technique for solving this problem. Various embodiments of the invention will be described in detail with reference to accompanying drawings
(21)
(22) In a step of 710, a fixed style parameter is set from style parameters in the METAFONT.
(23) That is, the METAFONT consists of the letter drawing function and the style parameter as mentioned above, and the fixed style parameter, of which style can't be changed, is set from the style parameters in the METAFONT. The fixed style parameter should not be amended.
(24) Here, the fixed style parameter can be set by a font producer, and it is the style parameter corresponding to a basic value which corresponds to the frame of the font. The fixed style parameter is a fixed value not changeable and it is included in an intermediate code described below. Here, the font producers can differently set the fixed style parameter.
(25) For example, the output range (ascender line, descender line) of the alphabet, the baseline as the location reference line of the letter, the cap height, etc. may be the fixed styled parameter. Referring to
(26) In a step of 720, the intermediate code is generated based on the letter drawing function and the fixed style parameter. Here, the intermediate code may be an assembly code which is a machine code. That is, in the step of 720, the intermediate code as the assembly code is generated by inputting the fixed style parameter in the letter drawing function, and it may correspond to a basic font.
(27) In other words, in the step of 720, optimized intermediate code is produced by redefining and rearranging the METAFONT developed in a program code through a specific rule. Since the fixed style parameter is not changed, it can be directly applied to the assembly code.
(28) Briefly, the intermediate code fixes the fixed style parameter so that a value of the fixed style parameter is not changed. As a result, intrinsic frame of the font designed by the font producer may not be changed and excessive letter transformation or unreadable transformation, etc. may be prevented, although the style of the font is changed by using the same variable style parameter.
(29) On the other hand, the METAFONT includes a font set value used basically as well as the style parameter for determining the style. The font set values mean basic values for using the METAFONT, and they may be referred to as meta data. In one embodiment, the font set values may be included in the fixed style parameter.
(30) For example, the font set values may include signature or version information of the font producer, applicable METAFONT engine version, log record parameter of a compile, the other data added according to object of the font producer and so on. The METAFONT had the demerits in that copyright or duty and right of the font is weak because corresponding font set values can be changed. The invention may solve the demerits by fixing the font set value in the intermediate code.
(31) In the step of 730, an output font is set by using the intermediate code and the variable style parameter, wherein the variable style parameter is included in the style parameter.
(32) In other words, the style parameter includes the variable style parameter which can change the style as well as the fixed style parameter. In the step of 730, the output font is generated by inputting the variable style parameter to the intermediate code.
(33) Here, the variable style parameter may be set by a user of the font, and it is set by user's request. For example, the variable style parameter may include thickness, slope, serif, etc. of the font.
(34) Particularly referring to
(35) In
(36) In one embodiment, in the step of 730, the output font may be generated by combining the intermediate code and the variable style parameter using a parameter mapping table. Here, the parameter mapping table indicates a guide table when inputting the variable style parameter in the intermediate code.
(37) Shortly, the output font generated by the method of generating the font of the invention is new font including characteristic of the METAFONT capable of changing the style freely and characteristic of the true type font capable of rasterizing in a unit of the letter. The output font will be referred as STEMFONT. The STEMFONT generates assembly code type intermediate code by using the letter drawing function and the fixed style parameter which is not changeable. The intermediate code is lighter than the font of the conventional METAFONT and it is a code optimized for outputting the font.
(38) That is, the method generates in advance the intermediate code and inputs only the variable style parameter in the intermediate code, thereby reducing a repetition process because every process of generating the font is not performed. Accordingly, the time taken for producing the font and cost may also reduce.
(39) In other words, the STEMFONT may employ various styles of fonts with one file, and so it is not necessary to produce multiple font files such as a conventional font family. Additionally, the STEMFONT may satisfy diverse demands of the users who want to use various styles of fonts because the style of the font can be freely changed in real time.
(40)
(41) In
(42) The apparatus 800 includes an intermediate code generating unit 810 and an output font generating unit 820. Hereinafter, elements of the font generation apparatus 800 will be described.
(43) The intermediate code generating unit 810 generates the intermediate code based on the letter drawing function and the fixed style parameter which cannot change the style, wherein the fixed style parameter included in the style parameter.
(44) The intermediate code may be received in advance from a terminal or a server of the font producer and then stored. In this time, the intermediate code generating unit 810 does not perform any operation.
(45) The output font generating unit 820 generates the output font by combining the intermediate code with the variable style parameters which can change the style.
(46) Here, the output font generating unit 820 may combine the intermediate code with the variable style parameter by using the parameter mapping table. The intermediate code may be an assembly code.
(47) In the above description, the embodiments of the font generation apparatus 800 are described. The method of generating the font in
(48) The technical features described above can be implemented in the form of program instructions that may be performed using various computer means and can be recorded in a computer-readable medium. Such a computer-readable medium can include program instructions, data files, data structures, etc., alone or in combination. The program instructions recorded on the medium can be designed and configured specifically for the present invention or can be a type of medium known to and used by the skilled person in the field of computer software. Examples of a computer-readable medium may include magnetic media such as hard disks, floppy disks, magnetic tapes, etc., optical media such as CD-ROM's, DVD's, etc., magneto-optical media such as floptical disks, etc., and hardware devices such as ROM, RAM, flash memory, etc. Examples of the program of instructions may include not only machine language codes produced by a compiler but also high-level language codes that can be executed by a computer using an interpreter, etc. The hardware mentioned above can be built to operate as one or more software modules that perform the actions of the embodiments of the invention, and vice versa.
(49) Components in the embodiments described above can be easily understood from the perspective of processes. That is, each component can also be understood as an individual process. Likewise, processes in the embodiments described above can be easily understood from the perspective of components. The embodiments of the invention described above are disclosed only for illustrative purposes. A person having ordinary skill in the art would be able to make various modifications, alterations, and additions without departing from the spirit and scope of the invention, but it is to be appreciated that such modifications, alterations, and additions are encompassed by the scope of claims set forth below.