My apologies for the confusion, I saw that you were suggesting as such
in your last email but thought you might not have known about that
branch. I'm not that familiar with the Java2D rendering, sorry I
couldn't be of more help.

Mehdi

On 10 March 2011 15:17, Marquart, Joshua D
<joshua.marqu...@firstdata.com> wrote:
> Thanks Medhi, but as I've explained we're trying to move away from producing 
> PostScript files and instead produce TIFF files.
>
> Our old practice: produce a PostScript via FOP and use a third-party software 
> to convert to TIFF.
> Our future practice: just produce the TIFF via FOP.
>
> My goal is to get the font to render a bit darker in the TIFF than it is 
> being produced at this time in order to come closer to the quality of the 
> image produced by PostScript then converting to TIFF.
>
> -Josh
>
> -----Original Message-----
> From: mehdi houshmand [mailto:med1...@gmail.com]
> Sent: Thursday, March 10, 2011 3:10 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Font Weight
>
> Hi Guys,
>
> Sorry to jump onto this so late in the game, but if you're trying to
> using TTF fonts with PostScript there is a branch called
> Temp_TrueTypeInPostScript which may help you. It allows you to embed
> TTFs in the PostScript which will mean you won't have to have the font
> installed on your printer and you can reference the font-file from
> your fop.xconf. If you have any issues I'd be more than happy to help.
>
> Mehdi
>
> On 9 March 2011 21:24, Marquart, Joshua D <joshua.marqu...@firstdata.com> 
> wrote:
>> The process that we have to take user-generated input and end up with a G4
>> TIFF file.
>>
>>
>>
>> The current process is like this:
>>
>>
>>
>> 1 - We've got a front-end system that generates HTML from XSLT with a flag
>> for input purposes (input form fields are generated), or output style.
>>
>> 2 - Generated html is passed through a transformer with html_to_fo.xsl
>> applied to create XSL-FO data.
>>
>> 3a - Today, we take the resulting XSL-FO data and use FOP to generate a
>> PostScript file, which is sent to a legacy third party library that
>> transforms the PostScript into a beautiful near-identical G4 TIFF.
>>
>>
>>
>> For technical reasons, we have to stop using the third party library which
>> is both EOL and creates issues (the library does not ignore a console
>> shutdown signal and kills the service).
>>
>>
>>
>> 3b - Tomorrow, I'd like to just take the resulting XSL-FO data and generate
>> the G4 TIFF files using FOP (hence my TIFF-focused Buzilla contributions
>> 49695, 49696 and 50657) .
>>
>>
>>
>> At the moment, I'm just straight generating the TIFF from the XSL-FO data.
>> It mostly looks like the source, but for some reason the lesser fonts are a
>> lot lighter.
>>
>>
>>
>> It's my understating that Fop is output-only when it comes to PostScript,
>> correct?
>>
>>
>>
>> For comparison purposes, I'm generating the PostScript and Tiff files as
>> flat files.
>>
>> Then I
>>
>> 1 - compare them side-by-side on the screen
>>
>> 2 - throw them both at a printer (and make sure the Tiff is sent through
>> PhotoShop and not shrunk to fit).
>>
>>
>>
>> The printouts line up physically, but the font for any 10pt in the Tiff is
>> much lighter (likely due to aliasing) than that produced with the
>> PostScript, or even that produced by a Tiff that has undergone the process
>> described in 3a above.
>>
>>
>>
>> With the "Oddly" comment quoted below, apparently the PostScript deferred to
>> "any,normal,400" and "any,normal,700" when confronted with
>> "Arial,normal,400", which is not a big deal because my eventual goal is
>> removing the PostScript.
>>
>>
>>
>> -Josh
>>
>>
>>
>> From: Eric Douglas [mailto:edoug...@blockhouse.com]
>> Sent: Wednesday, March 09, 2011 2:18 PM
>>
>> To: fop-users@xmlgraphics.apache.org
>> Subject: RE: Font Weight
>>
>>
>>
>> 1. If it's actually printing the wrong font that's a different issue.  We'd
>> have to see your font code for that.  That would be everything in the font
>> tags in the xconf file if you're using one, or your font loading method if
>> you're using embedded code, plus the text in the fo which references the
>> font triplet values.
>>
>> 2. What do you mean by lightness?  Are you using the PSRenderer and/or
>> TIFFRenderer to send output directly to a printer, to the same printer, back
>> to back?  Are you somehow using both renderers to generate image files to
>> compare, or comparing something printed to something on the screen?  Did you
>> use the PSRenderer to send output directly to a printer and the TIFFRenderer
>> to create an image file then send that image file to the printer?  It sounds
>> like we need more details on what you're trying to do.  It sounds like you
>> may be comparing apples to oranges.
>>
>>
>>
>>
>>
>> ________________________________
>>
>> From: Marquart, Joshua D [mailto:joshua.marqu...@firstdata.com]
>> Sent: Wednesday, March 09, 2011 2:07 PM
>> To: Glenn Adams
>> Cc: fop-users@xmlgraphics.apache.org
>> Subject: RE: Font Weight
>>
>> I was just doing research on this topic, came back here to supplement my
>> message with info, and saw you already beat me to it.
>>
>>
>>
>> Helpful method: getFontInfo().dumpAllTripletsToSystemOut()
>>
>>
>>
>> So... yes, I do not have fonts installed for font weights of 300, 500, etc.
>> and that would account for resolving to 400/700.
>>
>>
>>
>> The problem I'm seeing is when generating a PostScript and a Tiff from the
>> same xsl-fo file.
>>
>> The text generated in the Tiff (for the 400 weight) appears much lighter
>> than identical text in the PostScript and is likely due to using the
>> Java2DRenderer vs. the PsRenderer.
>>
>>
>>
>> Oddly, when I set the font to Arial in the xsl-fo:
>>
>> - the font in the resulting PostScript appears Times Roman
>>
>> - the font in the resulting Tiff is identical to the font used in the Tiff
>> when Helvetica was specified.
>>
>>
>>
>> Other than hunting down, installing and registering a weight 500 or so font
>> for Helvetica or Arial (where might I find one?  No idea.), are there other
>> options that might I employ to lessen the lightness of the 400-weight ?
>>
>>
>>
>> Thanks,
>>
>>
>>
>> -Josh
>>
>>
>>
>> From: Glenn Adams [mailto:gl...@skynav.com]
>> Sent: Wednesday, March 09, 2011 12:02 PM
>> To: Marquart, Joshua D
>> Cc: fop-users@xmlgraphics.apache.org
>> Subject: Re: Font Weight
>>
>>
>>
>> Josh,
>>
>>
>>
>> What you have not said yet is whether you actually have (on your system) a
>> font with the desired weight or not. Specifically, do you actually have
>> installed multiple font instances with the distinct weights you wish to
>> reference? If you do not, then it doesn't do much good to discuss referring
>> to them.
>>
>>
>>
>> On the other hand, if you do have distinct faces with weights 300, 500, 600,
>> 800, 900, etc., installed, then it is merely a matter of ensuring that the
>> reference in your FO file correctly maps to the associated font instance.
>> That can be handled in different ways.
>>
>>
>>
>> So please answer whether you do have the fonts installed in the first place
>> with these weights.
>>
>>
>>
>> G.
>>
>> On Wed, Mar 9, 2011 at 9:50 AM, Marquart, Joshua D
>> <joshua.marqu...@firstdata.com> wrote:
>>
>> "FOP does not synthesize fonts with different weights. You need to supply
>> the fonts with the weights you specify in FO content."
>>
>>
>>
>> I understand Fop doesn't synthesize the weights.  I understand that it has
>> two specific built-in weights (700 and 400) that are being used to replace
>> other weights per the following:
>>
>>
>>
>> When I set-up using a Java2DRenderer and specify the following FO content
>> snippets:
>>
>>
>>
>> <fo:table-cell font-size="10pt" font-family="Helvetica"><fo:block
>> line-height="13pt">
>>
>> <fo:block white-space-collapse="true">
>>
>> <fo:inline font-weight="900">900 Weight </fo:inline>
>>
>> ...
>>
>> <fo:inline font-weight="800">800 Weight </fo:inline>
>>
>> ...
>>
>> <fo:inline font-weight="700">700 Weight </fo:inline>
>>
>> ...
>>
>> <fo:inline font-weight="600">600 Weight </fo:inline>
>>
>> ...
>>
>> <fo:inline font-weight="500">500 Weight </fo:inline>
>>
>> ...
>>
>> <fo:inline font-weight="400">400 Weight </fo:inline>
>>
>> ...
>>
>> <fo:inline font-weight="300">300 Weight </fo:inline>
>>
>> </fo:block></fo:block></fo:table-cell>
>>
>> ...
>>
>>
>>
>> the logger gives me the following information:
>>
>>
>>
>> WARNING: Font "Helvetica,normal,900" not found. Substituting with
>> "Helvetica,normal,700".
>>
>> WARNING: Font "Helvetica,normal,800" not found. Substituting with
>> "Helvetica,normal,700".
>>
>> WARNING: Font "Helvetica,normal,600" not found. Substituting with
>> "Helvetica,normal,700".
>>
>> WARNING: Font "Helvetica,normal,500" not found. Substituting with
>> "Helvetica,normal,400".
>>
>> WARNING: Font "Helvetica,normal,300" not found. Substituting with
>> "Helvetica,normal,400".
>>
>>
>>
>> So I would need to supply very specific replacement fonts for
>> Helvetica,normal,900 ( and 800-300, not counting 400)?
>>
>> (Same as above when replacing Helvetica with Arial).
>>
>>
>>
>> I DO understand the following:
>>
>>
>>
>> 1- that per the current specs, item 7.9.9 for font-weight has a "TODO
>> <relative> font weights" message.
>>
>> 2 - that per the current build, the font classes generated from
>> Helvetica.xml and HelveticaBold.xml are used for 400 and 700 respectively
>>
>> 3 - that per the fuzzy replacement, 700 is used for 900-600 and 400 is used
>> for 500-100(probably).
>>
>>
>>
>> So my questions still stand
>>
>> 1 - is there a simpler way to use / access / apply a darker 500 or 600
>> weight Helvetica and if so, what's the best process to handle it given the
>> codebase?
>>
>> 2 - should I instead render a "Helvetica500.xml" and generate the
>> appropriate font class; obviously since that's not yet been done with the
>> existing fop codebase, it is probably a lot more work than needed.
>>
>> 3 - Any other option I should pursue?
>>
>>
>>
>> If there is a process started to handle item 7.9.9, I would be happy to
>> pitch in and help, I am just not certain where to start.
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Josh
>>
>>
>>
>>
>>
>> From: Glenn Adams [mailto:gl...@skynav.com]
>> Sent: Tuesday, March 08, 2011 6:40 PM
>> To: fop-users@xmlgraphics.apache.org
>> Cc: Marquart, Joshua D
>> Subject: Re: Font Weight
>>
>>
>>
>> FOP does not synthesize fonts with different weights. You need to supply the
>> fonts with the weights you specify in FO content.
>>
>>
>>
>> Regards,
>>
>> Glenn
>>
>> On Tue, Mar 8, 2011 at 4:31 PM, Marquart, Joshua D
>> <joshua.marqu...@firstdata.com> wrote:
>>
>> I have a question about Font Weight.
>>
>>
>>
>> We're using Helvetica and using FOP to take the FO file and generate it as
>> both (1) a PostScript file and (2) a TIFF file.
>>
>>
>>
>> Additionally, we are able to use third-party software to take the PostScript
>> file and convert it directly to a second TIFF file (for comparison reasons).
>>
>>
>>
>> Of course, the fonts on the TIFF from FOP are a little pixilated and the
>> "normal" font could stand to be rendered a bit darker.
>>
>>
>>
>> I am using Helvetica and tried to set the font-weight to 500 or 600, but it
>> gets replaced with weight 400, which is apparently the "normal" Helvetica
>> font registered in the system.
>>
>> Font-weight Bold and values of 800 and 900 use the "bold" Helvetica which is
>> weight 700.
>>
>>
>>
>> Is there an easy way to use / access a darker 500 or 600 weight Helvetica,
>> or possibly render the or am I really sunk here?
>>
>>
>>
>> I've already extended the Java2DRenderer,  for my own purposes.
>>
>>
>>
>> The following Graphics2D rendering hints don't seem to do much when
>> included:
>>
>>
>>
>> graphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
>> RenderingHints.VALUE_FRACTIONALMETRICS_ON);
>>
>> graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
>> RenderingHints.VALUE_ANTIALIAS_ON);
>>
>> graphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
>> RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
>>
>> graphics.setRenderingHint(RenderingHints.KEY_RENDERING,
>> RenderingHints.VALUE_RENDER_QUALITY);
>>
>> graphics.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
>> RenderingHints.VALUE_STROKE_PURE);
>>
>>
>>
>> Suggestions would be very helpful.
>>
>>
>>
>> Much thanks,
>>
>>
>>
>> Josh
>>
>>
>>
>> ________________________________
>>
>> The information in this message may be proprietary and/or confidential, and
>> protected from disclosure. If the reader of this message is not the intended
>> recipient, or an employee or agent responsible for delivering this message
>> to the intended recipient, you are hereby notified that any dissemination,
>> distribution or copying of this communication is strictly prohibited. If you
>> have received this communication in error, please notify First Data
>> immediately by replying to this message and deleting it from your computer.
>>
>> ________________________________
>>
>> The information in this message may be proprietary and/or confidential, and
>> protected from disclosure. If the reader of this message is not the intended
>> recipient, or an employee or agent responsible for delivering this message
>> to the intended recipient, you are hereby notified that any dissemination,
>> distribution or copying of this communication is strictly prohibited. If you
>> have received this communication in error, please notify First Data
>> immediately by replying to this message and deleting it from your computer.
>
>
> -----------------------------------------
> The information in this message may be proprietary and/or
> confidential, and protected from disclosure.  If the reader of this
> message is not the intended recipient, or an employee or agent
> responsible for delivering this message to the intended recipient,
> you are hereby notified that any dissemination, distribution or
> copying of this communication is strictly prohibited. If you have
> received this communication in error, please notify First Data
> immediately by replying to this message and deleting it from your
> computer.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to