PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Jul 12, 2024 10:25 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Thu Jul 21, 2011 1:01 pm 
Offline

Joined: Thu Jul 21, 2011 10:18 am
Posts: 5
Hi,

I'd like to know if it is possible to create outlined text and how.
By outlined text, I mean this:

Image

(yellow body, dark blue outline).

I think this "style" exists in the pdf format.

Otherwise, how could I mimic it by making the character fatter (increasing the font size doesn't work) ?

Thanks


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 22, 2011 9:21 am 
Offline

Joined: Thu Jul 21, 2011 10:18 am
Posts: 5
I forgot to mention that I use pdfSharp.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 25, 2011 3:20 pm 
Offline

Joined: Thu Jul 21, 2011 10:18 am
Posts: 5
No clues?
Is it possible to do it or is it something planned in a later release?

TIA


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 26, 2011 7:45 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
Hi!
Ankha wrote:
I think this "style" exists in the pdf format.

Can you provide a sample file with that text style?

Ankha wrote:
Otherwise, how could I mimic it by making the character fatter (increasing the font size doesn't work)?

Print the text several times at different positions.

Sample grid:
123
456
789

At positions 1, 3, 7, and 9 (or 1, 2, 3, 4, 6, 7, 8, 9) draw text in the outline color, at position 5 draw text in the inner color.

So if the normal text is to be at (100, 100) and you want an outline width of 1, draw the outline color at (99, 99), at (101, 99), at (99, 101), and at (101, 101), then draw the inner color at (100, 100).

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 26, 2011 7:51 am 
Offline

Joined: Thu Jul 21, 2011 10:18 am
Posts: 5
Thomas Hoevel wrote:
Hi!
Ankha wrote:
I think this "style" exists in the pdf format.

Can you provide a sample file with that text style?

Adobe Illustrator supports it, that's why I suppose there's a style of a sort. I'll check.

Thomas Hoevel wrote:
Ankha wrote:
Otherwise, how could I mimic it by making the character fatter (increasing the font size doesn't work)?

Print the text several times at different positions.

Sample grid:
123
456
789

At positions 1, 3, 7, and 9 (or 1, 2, 3, 4, 6, 7, 8, 9) draw text in the outline color, at position 5 draw text in the inner color.

So if the normal text is to be at (100, 100) and you want an outline width of 1, draw the outline color at (99, 99), at (101, 99), at (99, 101), and at (101, 101), then draw the inner color at (100, 100).

I'll try, but I fear it may not work with a 'o' for instance.


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 26, 2011 12:35 pm 
Offline

Joined: Thu Jul 21, 2011 10:18 am
Posts: 5
I tried your suggestion but it's not perfect.

I write the text in black in a circle around the white text.

Here's the result with 20 positions and 9 positions. The outline is "jagged". (What you see is the upper right corner of the 'g' letter).

Image


Top
 Profile  
Reply with quote  
PostPosted: Tue Jul 26, 2011 2:12 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
Ankha wrote:
I tried your suggestion but it's not perfect.

Not perfect, but only visible at a high zoom level.

It seems that Illustrator converts the text to a path and then draws that path in PDF.

PDFsharp can do that, too.
See page 3 of the output file of this sample:
http://www.pdfsharp.net/wiki/Graphics-sample.ashx
(shame on me, I should know our samples)

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group