Hello.
I'd like to use "bold" for Japanese font.
I execute the following sample code . But I was not able to output a "bold".
Is there anything wrong in the code or font ?
Language :C# VS2010
OS: Windows 7 Pro Japanese Edition
-------------------------------------------------
public static void Title(int pdf, int page, double x, double y, string txt, double fsize)
{
int fntID = 0;
int res = 0;
res = PDFXC_Funcs.PXC_AddFontW(pdf, FW_BOLD , false, "MS Gothic" , out fntID);
if (IS_DS_FAILED(res))
return;
......
}
-------------------------------------------------
Thanks.
About How to use "bold" for Japanese font.
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
-
- User
- Posts: 20
- Joined: Tue Aug 23, 2011 9:25 am
-
- Site Admin
- Posts: 17960
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: About How to use "bold" for Japanese font.
Hello elasoni,
Please make sure that your "pdf" is a pointer to a _PXCDocument.
Also are you getting any error codes as a result from the execution of PXC_AddFontW? Or does it return a non negative integer? (which would mean that the function succeeded)
Best,
Stefan
Please make sure that your "pdf" is a pointer to a _PXCDocument.
Also are you getting any error codes as a result from the execution of PXC_AddFontW? Or does it return a non negative integer? (which would mean that the function succeeded)
Best,
Stefan
-
- User
- Posts: 20
- Joined: Tue Aug 23, 2011 9:25 am
Re: About How to use "bold" for Japanese font.
Thank you for your prompt reply.
I checked "pdf" and the result code of PXC_AddFontW.
"pdf" ... pointer to a _PXCDocument :95748132
PXC_AddFontW ... It returns 0.
It seems to be fine.
But strings in the pdf was not changed to "bold" font.
It looks like "normal" font strings even though I set the FW_BOLD.
Is this a problem of font ?
Thank you.
I checked "pdf" and the result code of PXC_AddFontW.
"pdf" ... pointer to a _PXCDocument :95748132
PXC_AddFontW ... It returns 0.
It seems to be fine.
But strings in the pdf was not changed to "bold" font.
It looks like "normal" font strings even though I set the FW_BOLD.
Is this a problem of font ?
Thank you.
-
- Site Admin
- Posts: 3556
- Joined: Thu Jul 08, 2004 10:36 pm
- Location: Vancouver Island - Canada
Re: About How to use "bold" for Japanese font.
I'm afraid problem is because there are no bold variants of this font, only regular.
Tracker Software (Project Director)
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
-
- User
- Posts: 20
- Joined: Tue Aug 23, 2011 9:25 am
Re: About How to use "bold" for Japanese font.
Is there anything alternative method to get the result of something like "bold" ?
-
- Site Admin
- Posts: 5219
- Joined: Tue Jun 29, 2004 10:34 am
- Location: United Kingdom
Re: About How to use "bold" for Japanese font.
Hi,
checked with our resident expert on fonts and he advises ...
To make a real Bold font from normal - the answer is no.
But there are at least two ways to
1. Use Fill Stroketext rendering mode. Good for fonts like courier - with a constant line width.
2. Output the text several Times (usually 4) with very small offsets in both directions.
HTH.
checked with our resident expert on fonts and he advises ...
To make a real Bold font from normal - the answer is no.
But there are at least two ways to
Bold:simulate
1. Use Fill Stroketext rendering mode. Good for fonts like courier - with a constant line width.
2. Output the text several Times (usually 4) with very small offsets in both directions.
HTH.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Best regards
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com
-
- User
- Posts: 20
- Joined: Tue Aug 23, 2011 9:25 am
Re: About How to use "bold" for Japanese font.
Thank you for your help.
Your advice was really useful.
I tried the first one - To Use Fill Stroketext rendering mode.
The way you told me was really good and it satisfied me very much.
Your advice was really useful.
I tried the first one - To Use Fill Stroketext rendering mode.
The way you told me was really good and it satisfied me very much.
-
- Site Admin
- Posts: 17960
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
Re: About How to use "bold" for Japanese font.
Great to hear that elasoni!
Cheers,
Stefan
Cheers,
Stefan