forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using a "foreign" DLL with FTN95

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Sun Feb 07, 2016 1:31 pm    Post subject: Using a "foreign" DLL with FTN95 Reply with quote

I'm trying to make DLL for a Truetype font rendering library. It was written in "C", and compiled with MINGW compiler. SCC will not compile the original code (which would have been my preference); there are errors in the macro expansions and elsewhere that I cannot figure out, nor get around.

Is it possible (and permitted) to use this DLL with FTN95?

I have ZIPPED the FreeType library. I have, at the top level, FreeTypeSCC.sccp, the attempt to create an SCC version of the DLL.

I have also included a CodeLite (MINGW) project FREETYPETESTING that compiles all the modules and runs a little main routine. This compiles with a few warnings (in the MAIN), and runs.

The link to GoogleDrive is:
Quote:

https://drive.google.com/file/d/0B5fbkRqVCqoMTUdQbDhBdEdqem8/view?usp=sharing
Back to top
View user's profile Send private message Visit poster's website
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Sun Feb 07, 2016 5:18 pm    Post subject: Reply with quote

Quick FYI: The compile options "disappeared" from the Plato managed project. Have no idea why, but when I went to rebuild the project, I got all kinds of errors, attributable to the /DEFINE missing as well as all /INCLUDE's.

Also, found that the use of /OPTION file does not work as advertised because the file name is always surround in quotes. If one does the /OPTION "manually" without quotes, it will work.
Back to top
View user's profile Send private message Visit poster's website
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Tue Feb 16, 2016 6:56 pm    Post subject: Reply with quote

I have solved my problem (and opened some new observations).

I was able to create a DLL using CodeLite (MinGW compiler). Compiled the FTN95 using STDCALL as the option to the "C" interface. The MinGW compiled code has links to things like __mingw_vsprintf that don't actually get used when my application calls the code. So, there's no easy way to get debugging information out to the system. So, flying blind a bit, but it can be managed a dnumber of ways.

The code works great, and allows me to use the FreeType TTF text rendering in my application.

So, if you do have trouble with SCC, you might try the MinGW solution. It'll work. And if you have a need to use FreeType character conversion to bitmaps with the FTN95 interface, I can help!
Back to top
View user's profile Send private message Visit poster's website
DanRRight



Joined: 10 Mar 2008
Posts: 2816
Location: South Pole, Antarctica

PostPosted: Thu Feb 18, 2016 10:59 pm    Post subject: Reply with quote

Can you post some picture which shows advantage of FreeType TTF over 300+ regular Windows fonts on our computers? Also, are they usable with FTN95 OpenGL?
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Thu Feb 18, 2016 11:16 pm    Post subject: Reply with quote

My usage is not to supplant using native or TT fonts for Windows. It was desired to meet a specific need of mine. By extension, others may be able to use this as well.

Part of my commercial product involves creation of images that include text placed at arbitrary positions within the image. The images can be up to 600" in length, and up to 200" wide, and at up to 300 DPI. The process by which I was generating text on these images was a simplistic "font", similar to some of the FixedSYS fonts available in Windows. Originally, it was designed to be used on a pen plotter and consisted of coordinates and drawing commands. OK, but not optimal, even at large sizes. Unfortunately, at sizes as small as 0.08 inches (2 mm) the quality of some of the text was, to say the least, of marginal quality. Sometimes, for example, an "S" and a "5" are not distinguishable.

By replacing the original text generation SW with FreeType, even text as small as 2 mm is very readable on dot matrix printers as well being exceptionally readable in the BMP and JPG outputs the program can also generate.

The use of FreeType is not without cost (compute time for font rendering versus simple line drawing for the original text), but the increase of readability for my customers who then presents these data to their customers makes the small decrease in performance easy to accept.

Thanks for asking!
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Sun Feb 21, 2016 1:14 pm    Post subject: Reply with quote

Bill, I'm blown away by the thought of printing a 600x200 inch bitmap on a dot matrix printer, although I haven't had a dot matrix for some years, printing something this big would take my laser printer a couple of hours or more, use up the best part of 3 reams of paper (depends on overlap), and then take me at least a day with many rolls of adhesive tape! Plus a long time trimming the edges, as the printer always leaves a margin! If I used my reserve printer, it would use two toner cartridges, but only a fraction of my main printer's consumables.

I calculated it for US letter paper, and the answer is similar for the shorter but wider A4 as used by the six and a half billion of the rest of us who don't live in North America. There is something to be said for a wide carriage dot matrix printer with continuous stationery, as one could then print continuously over the perforations, and thus reduce the amount of adhesive tape required!

I was reminded of the students who chose to print a survey of a University campus at 1:1 instead of 1:500 ... after that experience I modified the program to only accept a limited range of scales.

Prior to nailing FTN's colours to the Windows mast, so back in the days of FTN77 for DOS with the DBOS DOS-extender, FTN used to have a nice graphics system that included the Hershey stick fonts for character generation. I wonder what happened to that stuff?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Mon Feb 22, 2016 8:32 am    Post subject: Reply with quote

DRAW_HERSHEY@ is still available for Win32 but it has not yet been ported to 64 bits. Is that what you mean?
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Mon Feb 22, 2016 1:50 pm    Post subject: Reply with quote

I wondered if it was one of the things that hadn't made it to the Windows version. Excellent if it is still there.

When I was using MS Fortran I wrote my own stick font routines, based around the characters drawn by a pen plotter, but it was nowhere near as sophisticated as the Hershey character sets.

In the recesses of my memory I seem to recollect that FTN77 came with a 'touch' utility, used to give files a specific date and time stamp. Am I right?

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Mon Feb 22, 2016 2:39 pm    Post subject: Reply with quote

I don't recall an FTN77 touch utility. I used to use a Borland version so this suggests that FTN77 did not have one. You can still download FTN77 so it would be possible to see what was included in the Win32 version (but download to another machine because you don't want to over-write salflibc.dll etc.).
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Tue Feb 23, 2016 5:50 pm    Post subject: Reply with quote

Paul,

I could see on the floppy disk if I still had a 5.25 drive attached to my PC: I can see my copy of FTN77/386 disk and manuals from where I'm sitting right now!

Eddie
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Tue Feb 23, 2016 7:27 pm    Post subject: Reply with quote

The UNIX "touch" utility sets the date/time to the current value. This Windows version allows you to set the date/time to anything as well as modifying the Last Accessed and Modification dates.

https://sourceforge.net/projects/touchforwindows/
Back to top
View user's profile Send private message Visit poster's website
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Wed Feb 24, 2016 1:15 pm    Post subject: Reply with quote

Folks,
I have a TOUCH.EXE which was located in the DBOS.DIR path. I have one dated 12/05/1995 & another dated 16/01/1996.

Borland C included a TOUCH.COM, I have a version dated 19/06/1992 & another dated 29/08/1988.

Ian
Back to top
View user's profile Send private message Send e-mail
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Wed Feb 24, 2016 1:24 pm    Post subject: Reply with quote

Hi Ian,

So my memory wasn't faulty! Hooray. Thanks.

Eddie
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group