View previous topic :: View next topic |
Author |
Message |
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Sun Feb 07, 2016 1:31 pm Post subject: Using a "foreign" DLL with FTN95 |
|
|
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:
|
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Sun Feb 07, 2016 5:18 pm Post subject: |
|
|
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 |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Tue Feb 16, 2016 6:56 pm Post subject: |
|
|
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 |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Thu Feb 18, 2016 10:59 pm Post subject: |
|
|
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 |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Thu Feb 18, 2016 11:16 pm Post subject: |
|
|
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 |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Sun Feb 21, 2016 1:14 pm Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon Feb 22, 2016 8:32 am Post subject: |
|
|
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 |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Mon Feb 22, 2016 1:50 pm Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon Feb 22, 2016 2:39 pm Post subject: |
|
|
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 |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Tue Feb 23, 2016 5:50 pm Post subject: |
|
|
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 |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Tue Feb 23, 2016 7:27 pm Post subject: |
|
|
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 |
|
|
IanLambley
Joined: 17 Dec 2006 Posts: 490 Location: Sunderland
|
Posted: Wed Feb 24, 2016 1:15 pm Post subject: |
|
|
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 |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Wed Feb 24, 2016 1:24 pm Post subject: |
|
|
Hi Ian,
So my memory wasn't faulty! Hooray. Thanks.
Eddie |
|
Back to top |
|
|
|