LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   RTF Editor like Wordpad on Ubuntu? (https://www.linuxquestions.org/questions/linux-software-2/rtf-editor-like-wordpad-on-ubuntu-4175612108/)

spartran 08-17-2017 02:26 AM

RTF Editor like Wordpad on Ubuntu?
 
Hi experienced Linux users, I have Ubuntu and I am looking after an editor for RTF.

The installation manager gives big softwares such as Libreoffice or Abiword. But, in Linux, aren't there many Wordpad applications?

I found many text editor but they do not give RTF support.

Gracias

genogebot 08-17-2017 02:33 AM

RTF is a proprietary Microsoft format, as mentioned at https://en.wikipedia.org/wiki/Rich_Text_Format, so it's not going to get a lot of love in the open source community.

spartran 08-17-2017 02:55 AM

Quote:

Originally Posted by genogebot (Post 5749156)
RTF is a proprietary Microsoft format, as mentioned at https://en.wikipedia.org/wiki/Rich_Text_Format, so it's not going to get a lot of love in the open source community.

Ah, I understand. This is why.

what is the opensource alternative of RTF which was given by Linux community?

Turbocapitalist 08-17-2017 03:17 AM

There isn't one really that is specific to GNU/Linux. If you want a universal format that is cross-platform and cross-application then the OpenDocument Format is the way to go. Even M$ Office can mostly read it, albeit begrudgingly, but will (intentionally) break it still. However, other productivity suites deal with it very well.

Then at the low end there is always plain text, either ASCII or UTF-8. Plain text: it was good enough for Shakespeare ...

Hard math based sciences still use LaTeX or similar.

Can you give a few details about the problem you are trying to solve?

spartran 08-17-2017 03:44 AM

Quote:

Originally Posted by Turbocapitalist (Post 5749162)
There isn't one really that is specific to GNU/Linux. If you want a universal format that is cross-platform and cross-application then the OpenDocument Format is the way to go. Even M$ Office can mostly read it, albeit begrudgingly, but will (intentionally) break it still. However, other productivity suites deal with it very well.

Then at the low end there is always plain text, either ASCII or UTF-8. Plain text: it was good enough for Shakespeare ...

Hard math based sciences still use LaTeX or similar.

Can you give a few details about the problem you are trying to solve?

My first goal was to use RTF, since I have to send a document in RTF format to my colleague. I had to type a simple document with basic things: bold, italic, underline. Nothing that would need a software like Office.

Latex is much too complex for me.

I edited the document under Ubuntu Linux with gedit (in plaintext). I copied on usb stick my document. Using my MacBook I made an RTF document and I could finish my document.

Turbocapitalist 08-17-2017 04:05 AM

Ok. If your goal is to only use one of the RTF formats, and specifically one of the RTF formats, then your choice is LibreOffice, Calligra, or AbiWord. You've seen at least two of those already. AbiWord is by far the lightest of the three.

<grumbling>
RTF, being vague and not really defined, is a little unsteady for real use. I used to use it a lot and found eventually that, like other M$ formats, it does not withstand the tests of time.

About Apple, it has really, really dragged its feet on OpenDocument Format support, but their lightweight editor does now finally support it -- if I recall correctly.
</grumbling>

knudfl 08-17-2017 06:46 AM

A simple rich text processor for Linux : Ted https://www.nllgg.nl/Ted/

See post #4 and #7 here
http://www.linuxquestions.org/questi...-4175605441/#4
Debian / Ubuntu package = ted_2.23-1debian8_amd64.deb (2.4MB).


-

DavidMcCann 08-17-2017 11:09 AM

I've swapped files in RTF with no problems. If you are simply indicating fonts and paragraph types, then there will be no problem. Difficulties only arise if you try anything elaborate, like complicated tables or frames. If you want something quick and easy, then Ted (see last post) is certainly worth looking at, otherwise just export from an ordinary word-processor.

Sefyir 08-17-2017 11:24 AM

Quote:

My first goal was to use RTF, since I have to send a document in RTF format to my colleague. I had to type a simple document with basic things: bold, italic, underline. Nothing that would need a software like Office.
Use a combination of markdown and pandoc?


https://askubuntu.com/a/315997 ->

Quote:

One alternative is http://johnmacfarlane.net/pandoc/ which is in the repos,

sudo apt-get install pandoc

Then you can take your **markdown** file and convert it to **rtf**, or a variety of other formats with,

pandoc -s -f markdown -t rtf -o file.rtf file.txt

The `-s` switch is for standalone, so that it doesn't just create an **rtf** fragment. There are also a variety of other useful switches such as `-S` for smart quotes. I use it all the time to create **epub** and **pdf** files.

It would also be a good idea to check out the documentation on their site, since the **pandoc markdown** format supports several extensions.

spartran 08-17-2017 02:21 PM

Quote:

Originally Posted by Sefyir (Post 5749311)
Use a combination of markdown and pandoc?


https://askubuntu.com/a/315997 ->

https://www.nllgg.nl/Ted/
I am so sorry. This link has not a compatible package for Ubuntu. Does Ubuntu have somewhere also Ted for Ubuntu ?

Regarding Pandoc and Markdown, they look like programming. I am not a programmer. I didn't know that Linux was so much complicated. I have used about 10 years Microsoft Windows and MAC.

I am sorry.

Habitual 08-17-2017 03:32 PM

Quote:

Originally Posted by spartran (Post 5749371)
I didn't know that Linux was so much complicated. I have used about 10 years Microsoft Windows and MAC.

I am sorry.

No reason to apologize. New tools for an old task, is all. ;)
I used to have to use only PFE on Windows, but I had to, to get the task done.
Now, there are mebbe a dozen similar tools. Notepad++ is ok, but I don't want to "install" stuff to open a simple Linux formatted file in Windows.

It gets easier.

spartran 08-17-2017 03:36 PM

Quote:

Originally Posted by Habitual (Post 5749409)
No reason to apologize. New tools for an old task, is all. ;)
I used to have to use only PFE on Windows, but I had to, to get the task done.
Now, there are mebbe a dozen similar tools. Notepad++ is ok, but I don't want to "install" stuff to open a simple Linux formatted file in Windows.

It gets easier.

I am learning Linux. It is complicated.

I was looking for just a sort of Wordpad only.

Rickkkk 08-17-2017 04:05 PM

Quote:

Originally Posted by spartran (Post 5749371)
https://www.nllgg.nl/Ted/
I am so sorry. This link has not a compatible package for Ubuntu. Does Ubuntu have somewhere also Ted for Ubuntu ?

Regarding Pandoc and Markdown, they look like programming. I am not a programmer. I didn't know that Linux was so much complicated. I have used about 10 years Microsoft Windows and MAC.

I am sorry.

As Habitual stated, no need to apologize. Learning something for the first time is demanding for anyone.

You should know, however, that even though it is by far preferable to use your linux distribution's repositories and packages when installing software, it is still possible to install a linux application from source. If you decide you want to try Ted, let us know and members here will help you.

*** EDIT *** I just looked at the Ted web page - they offer .deb packages (debian) which are compatible with Ubuntu. You should have no problem installing with these.

On another note, I would give Abiword some more consideration if I were in your situation. Although it IS a complete word processing application, it is extremely lightweight and very well suited to the need you have.

Cheers !

AwesomeMachine 08-17-2017 11:49 PM

Most Linux word processors should export to rtf format.

spartran 08-18-2017 02:38 AM

Quote:

Originally Posted by AwesomeMachine (Post 5749500)
Most Linux word processors should export to rtf format.

Linux Wordpad?

Habitual 08-18-2017 05:44 AM

One of the {libre,open}Office products can read RTF documents if that is the concern.

jefro 08-18-2017 03:12 PM

https://alternativeto.net/software/rtfeditor/

Shadow_7 08-18-2017 08:35 PM

libreoffice should export RTF. And several other editors. Otherwise markdown (with pandoc to make it human readable / meaningful) is probably the new gold standard for text documents. Try the usuals and see, like gedit, kedit / kate?, koffice, I think even wordgrinder exports RTF files.

In the days of OLD you would export RTF because M$ based things could read it pretty universally. Less relevant these days since most things can output PDF without adobe getting in the way (much). Plus RTF was less likely to be blocked by firewalls, email servers, and anti-virus programs.

Reziac 02-13-2022 02:23 AM

Has anyone come across any better ideas, now that you've had five years to think about it? :) RTF has the advantage of being completely portable across all platforms, and human-editable.

Ted is okay but it's not a great editor. LibreOffice bloats up the file with all sorts of print-layout code that can get really ugly if you have to hand-edit. AbiWord is lightweight but gunks up the RTF something awful (and doesn't respect system colors; I cannot use a glare white workspace). Over on Windows, Wordpad, RoughDraft, and similar dedicated RTF editors do not have these issues.

On my everyday setup, I finally gave up and installed WinXP in a VM, so I could have a decent RTF editor again. But I'd still like to have a nice RTF editor for my pinephone (which runs Manjaro).

pan64 02-13-2022 05:14 AM

Quote:

Originally Posted by Reziac (Post 6328943)
Has anyone come across any better ideas, now that you've had five years to think about it? :) RTF has the advantage of being completely portable across all platforms, and human-editable.

Ted is okay but it's not a great editor. LibreOffice bloats up the file with all sorts of print-layout code that can get really ugly if you have to hand-edit. AbiWord is lightweight but gunks up the RTF something awful (and doesn't respect system colors; I cannot use a glare white workspace). Over on Windows, Wordpad, RoughDraft, and similar dedicated RTF editors do not have these issues.

On my everyday setup, I finally gave up and installed WinXM in a VM, so I could have a decent RTF editor again. But I'd still like to have a nice RTF editor for my pinephone (which runs Manjaro).

did you try post #17 and post #18?

shruggy 02-13-2022 06:57 AM

Quote:

Originally Posted by Reziac (Post 6328943)
if you have to hand-edit.

Then I'm afraid there's no alternative to Ted. Any word processor¹ (including MS Word, BTW) would mangle RTF rather badly. The authors of word processors don't think of RTF as of document format in its own right, but just as of a data interchange format between different word processing systems. So, there's zero effort on their part to make produced RTF readable/editable by humans. Most users don't edit RTF by hand either. They just export to, or import from it to the native format of their word processors.

There's just no market for folks like you and me that would prefer edit their RTFs by hand. I reluctantly migrated all my RTF docs to LaTeX long ago, both on Linux and on Windows. Reluctantly, because I still feel there are cases where LaTeX is an overkill, while Markdown is not enough, and RTF would hit the sweet spot inbetween the best.

Unfortunately, the things I would go down the RTF route for (tables and footnotes) are often too much for either Ted or Pathetic Writer. Heck, even AbiWord sometimes couldn't render accurately the tables I produced in RTF by hand. That would leave only LibreOffice Writer, which is too heavy for the intended use and messes up all my carefully hand-formatted RTF anyway. And if I didn't need advanced table formatting and/or footnotes, I could do it in Markdown, so there's no point in using Ted or PW for me.

The bottom line: there's no tool comparable to WordPad on Linux, or at least, I couldn't find one.

If your aim is to produce RTF then I guess authoring documents in some other format and then converting them to RTF is a more viable alternative. Depending on what source format you prefer, the converter could be pandoc, latex2rtf, troffcvt, docbook2rtf, or something else. It's much easier to find a good Markdown or LaTeX editor that suites your taste. There are a couple of less known document preparation systems as well that claim to be able to produce RTF output: e.g. UDO, AFT, or SDF.

__________
¹ Pathetic Writer from the Siag Office suite being the only exception I know of. But it was last released 2006. It can still be built from source: I did it on CentOS 8. And if you find Ted limiting, then you'll probably find PW even more so.

cornjchob 02-18-2022 11:35 PM

Funny this thread was revived right when I have the same question.

Guess what, though? I haven't logged into LQ in about 15 years, but I did to post to this thread. Insodoing, you know what I found?

LQ's signature editor: font size, juxtaposition, wysiwyg -- everything this growing boy needs.

hashtag solved!

Reziac 02-19-2022 12:39 AM

Quote:

Originally Posted by pan64 (Post 6328972)
did you try post #17 and post #18?

Unfortunately "RtfEditor" is discontinued and not available for download; the interface does look nice. I don't need a lot of features, but I do need 1) not-white workspace, and 2) the output files to be interoperable with my main editor (RoughDraft). Too gunked-up and that can fail, plus good luck if you need to export to epub. And you can also start having problems like...

...oh, LibreOffice's tag nesting bug, where italics adjacent to Track Changes can result in the whole rest of the document turning to strikeout, and there's no fixing it without hand-editing the raw text. You can't just undo the strikeout, because it gets tangled up with Track Changes in varied and creative ways. If I weren't already fairly proficient at hand-editing, I'd have never found the error. (Have seen it multiple times; it's definitely a bug.)

An efficient way to de-gunk RTF is to export to HTML 3.x using something like Word Internet Assistant, then import back to RTF. Yes, a 28 year old tool from Microsoft does the best job, precisely because it's dumb as a post and strips out anything it doesn't understand.

Word used to export really clean RTF, but that changed when they went to DOCX. That, and ODT (and worse, Pages), are inventions of the devil. I have a client who lost a whole finished novel due to a DOCX's ZIP header getting corrupted (and all the backups were bad the same way. I'm pretty good at dragging data out of broken files, but all that was recoverable was a background image.) ODT is for all practical purposes the same format (ZIP'd XML).

.DOC was ugly inside, but the text was always hand-recoverable.

FreeOffice and AbiWord both export the ugliest RTF I've ever seen, plus do weird things to line spacing.

My cynical little voice opines that back in the day it was a point of Religion that anything Microsoft does, Linux does the opposite, so if MSFT developed an RTF editor, by jolly Linux will never have an RTF editor!! and once the office suites came along, there was no longer a perceived demand, because who wouldn't want a giant office suite and bloated files when all you needed was clean and tidy formatting??

Reziac 02-19-2022 12:44 AM

Quote:

Originally Posted by shruggy (Post 6328992)
There are a couple of less known document preparation systems as well that claim to be able to produce RTF output: e.g. UDO, AFT, or SDF.

Those look worth investigating, at least... thanks!

vmelkon 02-23-2022 09:43 PM

Quote:

Originally Posted by Reziac (Post 6331149)
FreeOffice and AbiWord both export the ugliest RTF I've ever seen, plus do weird things to line spacing.

My cynical little voice opines that back in the day it was a point of Religion that anything Microsoft does, Linux does the opposite, so if MSFT developed an RTF editor, by jolly Linux will never have an RTF editor!! and once the office suites came along, there was no longer a perceived demand, because who wouldn't want a giant office suite and bloated files when all you needed was clean and tidy formatting??

Yes, I know what you mean.
I used Wordpad often on Windows and saved as RTF.
When I moved to Linux, I had to use LibreOffice but it produces an RTF file that is bloated, filled with junk. I have a Ryzen 5 3600 3.6 GHz CPU and it took up 2 or 3 min to open certain RTF files generated by LibreOffice. It was just a 20 page document, with some bold and color changes. Nothing fancy. No images.
That's a problem that I ran into a few times.
Then I started to use the ODT format. This is a zip compressed format but again, certain files become bloating and take +1 min to open.

Anyway, if you want to use Wordpad, install WINE on your Ubuntu. You can install it from your AppStore.
There is a WINE version of Wordpad. Open the terminal and type
wine wordpad

Or, if you want the real version, get Microsoft's wordpad.exe and run it with WINE.

Reziac 02-23-2022 10:39 PM

Quote:

Originally Posted by vmelkon (Post 6332712)
Anyway, if you want to use Wordpad, install WINE on your Ubuntu. You can install it from your AppStore.
There is a WINE version of Wordpad. Open the terminal and type
wine wordpad

Or, if you want the real version, get Microsoft's wordpad.exe and run it with WINE.

I've had zero luck with WINE, tho hopefully someday it'll decide to speak to me :) but thanks for the tip; I didn't realise there was a WINE wordpad. Apparently Atlantis now works with WINE too.

On my everyday setup, as noted, I installed WinXP in VirtualBox, and use that to run the various tools I can't live without, including an RTF editor (mostly I use RoughDraft). But neither that nor WINE is suitable for slim or resource-limited setups, and the idea of using WINE on my PinePhone is just comical.

It wouldn't even need to be full-featured. KWrite with the ability to handle basic RTF formatting would be great.

vmelkon 02-24-2022 10:56 AM

Quote:

Originally Posted by Reziac (Post 6332722)
I've had zero luck with WINE, tho hopefully someday it'll decide to speak to me :) but thanks for the tip; I didn't realise there was a WINE wordpad. Apparently Atlantis now works with WINE too.

On my everyday setup, as noted, I installed WinXP in VirtualBox, and use that to run the various tools I can't live without, including an RTF editor (mostly I use RoughDraft). But neither that nor WINE is suitable for slim or resource-limited setups, and the ideal of using WINE on my PinePhone is just comical.

It wouldn't even need to be full-featured. KWrite with the ability to handle basic RTF formatting would be great.

Yes, WINE is very big. It doesn't make sense to need WINE to run a 500 kB wordpad.exe

I have a C++ class for writing RTF files. I can give it to you if you want to insert it into KWrite
Here is an example.
Code:

TRTFFile rtfFile;
//I want to make the words larger
rtfFile.SetTextSize(22);
rtfFile.AddText("Bla bla bla");
rtfFile.AddNewLine(2);
rtfFile.SetTextSize(10);
rtfFile.AddNewLine(2);
rtfFile.SetTextBold(TRUE);
rtfFile.AddText("Bla bla bla");
rtfFile.SetTextBold(FALSE);
rtfFile.AddNewLine(1);
rtfFile.AddText("Bla bla bla");
rtfFile.AddNewLine(1);
rtfFile.SetTextColor(TRUE, 0, 0, 255);//BLUE
rtfFile.AddText("Bla bla bla");
rtfFile.SetTextColor(FALSE, 0, 0, 0);//BLACK
rtfFile.AddText("Bla bla bla");
//Save the file
rtfFile.SaveFile(pSaveFilePath);
rtfFile.DeallocateAllMemory();


Reziac 02-24-2022 11:24 AM

Quote:

Originally Posted by vmelkon (Post 6332891)
I have a C++ class for writing RTF files. I can give it to you if you want to insert it into KWrite
Here is an example.

I don't understand how that works -- you mean something to recompile into KWrite?

That's a little beyond my present skillset... really cool that you can, tho :)

pan64 02-25-2022 09:33 AM

Quote:

Originally Posted by Reziac (Post 6332902)
I don't understand how that works -- you mean something to recompile into KWrite?

That's a little beyond my present skillset... really cool that you can, tho :)

no, not into KWrite I guess. But actually that can be implemented/solved too.
Anyway, it looks like it is not really convenient for you. I think you can make wordpad.exe work much easier.

Reziac 02-25-2022 10:40 AM

Quote:

Originally Posted by pan64 (Post 6333106)
no, not into KWrite I guess. But actually that can be implemented/solved too.
Anyway, it looks like it is not really convenient for you. I think you can make wordpad.exe work much easier.

Yep, one can always use the workaround of a Windows app in one host or another. But it's kinda irritating that we don't have a really good native RTF editor, which in turn would be natively suitable for low-resource systems.

Or even an HTML editor that would export RTF, given that's mostly a tag substitution, with similar requirements for tag nesting. (We did that with a script in WordPerfect 5.0 in 1988, fer ghu's sakes...)

I'd settle for Ted if the durn thing would do anything but a glare white workspace. But for me that makes it For Emergency Use Only.

pan64 02-25-2022 11:16 AM

Quote:

Originally Posted by Reziac (Post 6333127)
But it's kinda irritating that we don't have a really good native RTF editor, which in turn would be natively suitable for low-resource systems.

see post #2 about it

DavidMcCann 02-25-2022 11:18 AM

Any word-processor should cope with RFT. I've just exported a file from Apache OpenOffice in RTF and reloaded it with no problems.

Reziac 02-25-2022 12:12 PM

Quote:

Originally Posted by DavidMcCann (Post 6333144)
Any word-processor should cope with RFT. I've just exported a file from Apache OpenOffice in RTF and reloaded it with no problems.

They can cope with it just fine. The problem is they bloat up the file and make a mess of the internal formatting. (Not to mention being too heavy for, say, my pinephone.)

Dedicated RTF editors don't add all the print layout codes that fullblown word processors do. Once that's in there, you have to find another tool to clean it out if you want to turn the file into, frex, a clean epub (free of weird formatting glitches, and not fighting with your chosen theme).

Or do a hand-edit cleanup, which is just loads of fun, tho has made me lots of money.

If you want to know how bad the bloat can get -- typically it's 2-3x the original, but I've seen LibreOffice crank a 500k RTF file into over 500mb, because it had made such a hash of its own added formatting. (This wasn't even a complex file; the only complicated part was Track Changes.)

Reziac 02-25-2022 12:21 PM

Quote:

Originally Posted by pan64 (Post 6333143)
see post #2 about it

Yeah, I think that's the real problem. Anti-Microsoft is a religion. But RTF is a completely interoperable open format with a published spec, what more do you want?

boughtonp 02-25-2022 04:46 PM


 
Delphi used to have an RTF component, so I wonder what the Open Source cross-platform Lazarus does in that respect...

A quick search suggests there is a port which might be good enough?

Quote:

Originally Posted by https://wiki.freepascal.org/lzRichEdit
Linux file reading is made by FPC TRTFParser class, with some changes to support images, this class is slower on complex files. Linux version supports only text formatting.

The download there includes a demo which might already be sufficient, but if not shouldn't take much effort to evolve into a basic RTF editor.


Reziac 02-25-2022 05:17 PM

Quote:

Originally Posted by boughtonp (Post 6333228)
Delphi used to have an RTF component, so I wonder what the Open Source cross-platform Lazarus does in that respect...

A quick search suggests there is a port which might be good enough?

The download there includes a demo which might already be sufficient, but if not shouldn't take much effort to evolve into a basic RTF editor.


The screenshot certainly looks good enough, but I downloaded the files and did not see any executable demo?

Not being a programmer (tho at times an interested bystander), I'd forgotten about Lazarus. Seems they win the award for the most cross-platform IDE ever. Thanks for the reminder; I have pascal source for an ancient (1991) DOS program I can't live without, and someday I'd like to see if it can be compiled in a more modern form.

boughtonp 02-25-2022 06:03 PM


 
Didn't mean to suggest it was pre-compiled - you'll need to install Lazarus and compile it to get the executable.


Reziac 02-25-2022 06:13 PM

Ah, okay, thanks. Been meaning to install Lazarus regardless! (But not today... busy...)

Should I achieve anything worth saving, I'll report back. More likely someone here will beat me to it. :)

vmelkon 02-25-2022 11:35 PM

Quote:

Originally Posted by Reziac (Post 6332902)
I don't understand how that works -- you mean something to recompile into KWrite?

That's a little beyond my present skillset... really cool that you can, tho :)

I looked at KWrite. It looks like Kate, which is sort of a basic text editor so I think that is not suitable.
I do remember using KWrite over 10 y ago.
It handles text highlighting, which is suitable for programmers but you won't be able to freely bold, underline, italicize, change font for each word or line.

Reziac 02-26-2022 12:45 AM

Quote:

Originally Posted by vmelkon (Post 6333294)
I looked at KWrite. It looks like Kate, which is sort of a basic text editor so I think that is not suitable.
I do remember using KWrite over 10 y ago.
It handles text highlighting, which is suitable for programmers but you won't be able to freely bold, underline, italicize, change font for each word or line.

To my understanding, Kate and KWrite are the same program under the hood.

Kate understands how to parse and highlight the formatting code in RTF (and a zillion other formats) but it only displays plain text.

I have no idea how hard it is to get from there to a WYSIWYG document display, but seems to me a lot of the guts are already there.

vmelkon 02-26-2022 01:01 PM

Quote:

Originally Posted by Reziac (Post 6333301)
To my understanding, Kate and KWrite are the same program under the hood.

Kate understands how to parse and highlight the formatting code in RTF (and a zillion other formats) but it only displays plain text.

I have no idea how hard it is to get from there to a WYSIWYG document display, but seems to me a lot of the guts are already there.

It's child's play.
Think in terms of low level programming.
If you want to render text, there are certain properties that you want to control:
1. The font
2. color
3. bold
4. italic
5. underline

Your code would look something like this
ChooseFont("Courrier");
setBold(true);
renderText_at_position_xy(0, 0, "bla bla bla");

You also need to keep data structures to know when to switch a properties.
You also need to know the line spacing needed. You use whatever API has to offer to get the text height.

I've writing a similar program to Kate, with text highlighting long ago, for Windows.
It was for writing OpenGL shaders.

But the guys of WINE have already written a Wordpad. Maybe they should compile a Linux native version.
https://appdb.winehq.org/objectManag...rsion&iId=1757

Reziac 02-26-2022 02:02 PM

Quote:

Originally Posted by vmelkon (Post 6333432)
It's child's play.
Think in terms of low level programming.
If you want to render text, there are certain properties that you want to control:
1. The font
2. color
3. bold
4. italic
5. underline

Your code would look something like this
ChooseFont("Courrier");
setBold(true);
renderText_at_position_xy(0, 0, "bla bla bla");

You also need to keep data structures to know when to switch a properties.
You also need to know the line spacing needed. You use whatever API has to offer to get the text height.

Thanks, now I understand how it's done, even tho I don't have the skills to do it.

I wish the source for my fave RTF editor was available (the program is abandoned).


All times are GMT -5. The time now is 05:28 PM.