发信人: monopoly (谢绝投条 ==> [信件过量,请整理信件!]), 信区: ANSI
标 题: 趁着东风,吹一把fterm下复制粘贴要注意的问题
发信站: 日月光华 (2007年01月28日00:10:29 星期天), 站内信件
1. 最重要的问题,就是fterm会自动忽略选中区域最后一个更改ANSI代码的半角字符
无论最后一个半角字符,更改的是前景色还是背景色或其他色彩控制
而对于全角字符,或最后连续若干个半角字符显示为同一种色彩控制时,无该bug
如 欢迎大家! 直接选中复制粘贴时就会成为 欢迎大家
而 欢迎大家! 或 欢迎大家! 在复制时就不会出问题
解决方法:在普遍情况下,请多选一列右侧空白列,以防止出现这个bug
在全部为全角字符(如前景色块、表格边框等)时,可以忽略
2. 对于ANSI作品代码的颜色控制,要避免观看效果的不一致
尽量在行首或每行作品的开始处首先声明亮度,*[1;...m 或 *[0;...m
并在行尾以*[m或*[0m结束(建议使用*[m,其一短,其二适合不同默认亮度)
这样做的目的是防止亮度溢出(对于颜色溢出,大部分人都会很快注意到)
这点对于把ae复制上来就直接粘贴的人,尤其需要注意
就拿上文中的fterm图标作例子
——以下为默认低亮时复制直接粘贴——
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
◤ ▄▄▄ ▄▄▄ ◥
█ █
▌▌ ▌▌
█ █
▄▄▄ ▄▄▄
▄▄▄▄▄▄▄
◣ ┃ ◢
┃
SpiritRain ┃ RYGH ▄
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▄▄▄▄▄▄▄▄▄▄▄▄
▄▄▄◤▄▄▄▄▄▄▄▄◥▄▄▄
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
——以下为默认高亮时复制直接粘贴——
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
◤ ▄▄▄ ▄▄▄ ◥
█ █
▌▌ ▌▌
█ █
▄▄▄ ▄▄▄
▄▄▄▄▄▄▄
◣ ┃ ◢
┃
SpiritRain ┃ RYGH ▄
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▄▄▄▄▄▄▄▄▄▄▄▄
▄▄▄◤▄▄▄▄▄▄▄▄◥▄▄▄
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
——这个图标是不是变成翻白眼了?——
无论默认亮度如何,这个fterm图标在原文里是完全正常的
但无论默认亮度如何,这个fterm图标在fterm下复制出来的代码是相同的并且不正常的
所以说,在fterm下,从上文中,不修改直接复制出正常的图标,是不可能的
究其原因,是这个图标前面有一块高亮的文字区域
这些文字区域的高亮控制,溢出到了后面的图标区域的最左侧的*[47;37m空格中
复制粘贴时,这些空格属性变成了*[1;47;37m,继发性地导致了各行其后的亮度溢出
在修改时,只要在每行前把低亮这个属性补足/改正就可以了
这里已经涉及到了代码的修改问题,既然本章没有提到,我也不多说了
上面提到的第2点,主要指的只是简单复制粘贴时记得在行首手动补上亮度声明就可以了
——以下为对行首简单修改后再粘贴——
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
◤ ▄▄▄ ▄▄▄ ◥
█ █
▌▌ ▌▌
█ █
▄▄▄ ▄▄▄
▄▄▄▄▄▄▄
◣ ┃ ◢
┃
SpiritRain ┃ RYGH ▄
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▄▄▄▄▄▄▄▄▄▄▄▄
▄▄▄◤▄▄▄▄▄▄▄▄◥▄▄▄
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
——这在默认高亮下还是有个小问题——
这不关复制粘贴的事,是fterm没识别好。
--
海纳百川,有容乃大
壁立千仞,无欲则刚
※ 来源:·日月光华 bbs.fudan.edu.cn·[FROM: 10.100.111.111]
※ 修改:·monopoly 於 01月28日00:15:33 修改本文·[FROM: 10.100.111.111]
Sender: monopoly Reject submission > [Too many letters, please sort them out!], Area: ANSI
Title: Taking advantage of the east wind, issues to pay attention to when copying and pasting under fterm
Sending site: Sun and Moon Guanghua January 28, 2007 00:10:29 Sunday, site mail
1. The most important problem is that fterm will automatically ignore the last half-width character in the selected area that changes the ANSI code.
Regardless of whether the last half-width character changes the foreground color, background color or other color control
There is no such bug when full-width characters or the last several consecutive half-width characters are displayed with the same color control.
For example, Welcome everyone! If you directly select and copy and paste, it will become Welcome everyone.
And Welcome Everyone or Welcome Everyone! will cause no problems when copying
Solution: In general, please select one more column with a blank column on the right side to prevent this bug from occurring.
It can be ignored when all characters are full-width characters, such as foreground color blocks, table borders, etc.
2. Color control of ANSI work codes to avoid inconsistent viewing effects
Try to first declare brightness *[1;...m or *[0;...m at the beginning of the line or at the beginning of each line of work)
And end with *[m or *[0m at the end of the line. It is recommended to use *[m. One is short and the other is suitable for different default brightness.
The purpose of this is to prevent brightness bleeding, which most people will notice quickly.
This is especially important for people who copy and paste ae directly.
Take the fterm icon above as an example.
The following is copied and pasted directly when the brightness is low by default.
SpiritRain RYGH
The following is copied and pasted directly when highlighted by default
SpiritRain RYGH
Does this icon turn into an eye roll?
Regardless of the default brightness, this fterm icon is completely normal in the original text.
But no matter what the default brightness is, the code copied from this fterm icon under fterm is the same and is abnormal.
Therefore, under fterm, it is impossible to directly copy the normal icon from the above without modification.
The reason is that there is a highlighted text area in front of this icon
The highlight control of these text areas overflows into the leftmost *[47;37m space of the following icon area.
When copying and pasting, these space attributes become *[1;47;37m, which subsequently causes the brightness to overflow after each line.
When modifying, just add the low-light attribute before each line and correct it.
The issue of code modification has already been involved here. Since it is not mentioned in this chapter, I won’t say more.
Point 2 mentioned above mainly refers to simply remembering to manually add the brightness statement at the beginning of the line when copying and pasting.
The following is a simple modification to the beginning of the line before pasting it
SpiritRain RYGH
There is still a small problem with this under default highlighting.
This has nothing to do with copying and pasting. It's just that fterm didn't recognize it properly.
Be tolerant to diversity, tolerance is a virtue
Standing on a wall for thousands of feet, being strong without desire
Source: Sun and Moon Guanghua bbs.fudan.edu.cn [FROM: 10.100.111.111]
Modification: monopoly modified this article at 00:15:33 on January 28th [FROM: 10.100.111.111]