Toad World® Forums

RE: RE: copy paste font


#1

Now you guys have me playing with this as well.

One thing I noticed is that when I paste several lines from TOAD, the font is
the MS Shell for the text, but the spaces are my TOAD editor font. Below is a
sample, the spaces are Courier New, the text is

My guess is that this is a MS Word bug, perhaps related to the fact my font is
not a TrueType font?? My options are set like Nate’s options are, so it
doesn’t appear to be because of that. . .

INSERT /+APPEND/

/*+PARALLEL (SIEBEL.EIM_ORDER1,8) */

INTO SIEBEL . EIM_ORDER1 NOLOGGING( ROW_ID

, IF_ROW_BATCH_NUM


#2

Intriguing. Did you notice that the spaces in the comments don’t follow
that pattern, Phyllis? Now isn’t that entertaining!

I suspect it somehow has to do with the Toad syntax highlighting, but I
can’t really say how or why.

Nate Schroeder

US Seed & Trait Commercial IT - Data Management Team

Monsanto Company

800 N. Lindbergh Blvd. LC4D - Saint Louis, MO - 63167

314-694-2592

This e-mail message may contain privileged and/or confidential information, and is intended to be received only by persons entitled to receive such information. If you have received this e-mail in error, please notify the sender immediately. Please delete it and all attachments from any servers, hard drives or any other media. Other use of this e-mail by you is strictly prohibited.

All e-mails and attachments sent and received are subject to monitoring, reading and archival by Monsanto, including its subsidiaries. The recipient of this e-mail is solely responsible for checking for the presence of “Viruses” or other “Malware”. Monsanto, along with its subsidiaries, accepts no liability for any damage caused by any such code transmitted by or accompanying this e-mail or any attachment.

The information contained in this email may be subject to the export control laws and regulations of the United States, potentially including but not limited to the Export Administration Regulations (“EAR”) and sanctions regulations issued by the U.S. Department of Treasury, Office of Foreign Asset Controls (“OFAC”). As a recipient of this information you are obligated to comply with all applicable U.S. export laws and regulations.


#3

Phyllis,

Wow, I totally did not catch that the SPACEs are a different font than the TEXT.
Mine works the same way. The spaces are in my designated font and the text is in
MS Shell. Weird.

Michael J. Moore

PL/SQL Developer


#4

No, I hadn’t noticed that, but you are right. They stay in the MS Shell
font.

I hope nobody works all weekend on figuring this one out.


#5

The diffs occur in versions of Toad compiled with Delphi 7 compared to those
compiled with Delphi 2009. I’ve sent the component developer an email and
will let you know what I find out. I’ve compared some relatively old code
to the new and it seems that nothing has changed in the RTF text generation so I
assume that the change from ANSI to UTF-16 strings internally may be the
culprit, but I’ll await confirmation from the other guy.

Michael


#6

Okay, I’ve done some more work (accidentally) on this, and have discovered
something else that hopefully will help those with more time (and access to
source code) to learn more.

You know how, on Options/Editor Behavior/Languages/PLSQL/Syntax Highlighting,
you can specify the “Style type” of various elements as “Default Font”
or “Custom Font”? And if you say Custom Font, you can then set what that
font is? It looks like the cut-and-paste is reading whatever is set as the
Custom Font, even if the Style Type is set to Default Font. Try changing to
Custom Font, changing that custom font, then (optionally) changing the Style
Type back to Default Font, and see if it affects how things are cut-and-pasted.

Nate Schroeder

US Seed & Trait Commercial IT - Data Management Team

Monsanto Company

800 N. Lindbergh Blvd. LC4D - Saint Louis, MO - 63167

314-694-2592


#7

Ok, there’s a short and a long answer to this. More importantly, there is
a workaround.

The short answer, the problem has always been there, but surprisingly (or not)
only surfaced when we started supporting Unicode and changed the default font to
MS Shell Dlg 2. I am working with someone on this, but it will be fixed at some
point in the Toad 11 cycle.

Here is the workaround. This should be relatively safe, but proceed at your own
risk.

Close Toad.
Locate your \User Files\LexLib.lxl file.
Back this file up.
In case you skipped step 3, back this file up.
Open it in a text editor.
Search and replace all occurrences of ‘MS Shell Dlg 2’ with
‘Your Font’.

Michael


#8

Thanks Michael, much appreciated!

Michael J. Moore

PL/SQL Developer


#9

I think it’s the little things like this, attention to detail, and
responsiveness that makes Toad stand out in a big way.

I was talking to a dubious attendee at OOW this week and in 30 seconds just
reeled off in the editor the split panel, code insight, and refactoring features
and it really blew them away.

Thanks for making our jobs easier!


#10

Nice.

If I was to MS Shell Dlg 2 the default font for TOAD would that also solve the
problem?

Just curious.


#11

If I understand you correctly then, yeah, that too would work. :slight_smile: Writing code
with a non-fixed width font may prove to be a little aggravating though.

Michael


#12

That’s true. I was just thinking of a shortcut. J

The good news is that I don’t do a lot of copy/paste where I care about
the font used. I just got into this discussion because it had me intrigued.