如何将 (x,y) 坐标归因于文本?

发布于 2024-07-19 07:45:53 字数 218 浏览 1 评论 0原文

问候,有没有人对我如何做有建议,a)在网格上映射文本(我想象的是笛卡尔系统,其中每个字符都有一个(x,y)坐标,或b)如果网格不可行,以某种方式测量文本 i) 字符的位置、一个文本位置与另一个 x2-x1 水平方向之间的差异(增量)或一个文本位置与另一个垂直 y2-y1 之间的差异? 我使用的是 PC,需要建议的编程方法或程序建议(是否有任何人都知道的具有此功能的基于 PC 的文本程序)? 预先非常感谢, 茶~茶

Greetings, Does anyone have a suggestion on how I can either, a) map text on a grid (what i imagine is a Cartesian system where each character has a (x,y) coordinate, or b) if a grid is not possible, somehow measure text for i)location of a character, difference (delta) between one text location and another x2-x1 horizontal or difference between one text location and another vertically y2-y1? I am on a PC and would require a suggested programming method or program suggestion (is there a PC based text program with this feature that anyone knows of)? Thanks so much in advance,
c~tea

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

燕归巢 2024-07-26 07:45:53

在没有定义的编程语言的情况下,我建议使用 PostScript

PostScript 是一种页面描述语言,具有您要求的功能。 许多印刷商可以直接理解它,其余的则有翻译员。 它也是 PDF 文件格式的基础。 维基百科页面上有一个演示坐标系使用的示例:

%!PS
/Courier             % name the desired font
20 selectfont        % choose the size in points and establish 
                     % the font as the current one
72 500 moveto        % position the current point at 
                     % coordinates 72, 500 (the origin is at the 
                     % lower-left corner of the page)
(Hello world!) show  % stroke the text in parentheses
showpage             % print all on the page 

坐标系的原点位于左下角,以点(1/72 英寸)为单位进行测量

In the absence of a defined programming language, I suggest PostScript.

PostScript is a page description language which has the feature you ask. It is understood by many printers directly and for the rest there are interpreters. It is also the basis of the PDF file format. On the wikipedia page is an example that demonstrates the use of the coordinate system:

%!PS
/Courier             % name the desired font
20 selectfont        % choose the size in points and establish 
                     % the font as the current one
72 500 moveto        % position the current point at 
                     % coordinates 72, 500 (the origin is at the 
                     % lower-left corner of the page)
(Hello world!) show  % stroke the text in parentheses
showpage             % print all on the page 

The coordinate system has its origin in the lower left corner and is measured in points (1/72 inch)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文