LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-08-2020, 02:10 PM   #1
Portal
LQ Newbie
 
Registered: Jun 2019
Posts: 27

Rep: Reputation: Disabled
Where is the documentation for the X rendering extension library?


I am currently studying the source code of dwm. DWM uses a function XftTextExtents, which modifies a XGlyphInfo struct. Man xft(3) gives that this XGlyphInfo struct is defined in the X rendering extension library, but nowhere can I find the source code/documentaiton of this library. Where can I find the struct declarations of XGlyphInfo?
 
Old 03-08-2020, 02:17 PM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
select right click google "XGlyphInfo" got this
https://www.x.org/releases/X11R7.5/d...libXrender.txt
http://hackage.haskell.org/package/X...1-Xrender.html
https://osnacs.github.io/plantex/x11...GlyphInfo.html
and a bunch more... easy pesy
 
Old 03-08-2020, 02:21 PM   #3
Portal
LQ Newbie
 
Registered: Jun 2019
Posts: 27

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
Do you happen to know what the xOff attribute of the struct is?
 
Old 03-08-2020, 02:32 PM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
it is in the link.
btw I have no idea about anything. I googled this remember. you might be surprised at how much information is out there if you search for it first. just saying...
Code:
typedef struct _XGlyphInfo {
	    unsigned short  width;
	    unsigned short  height;
	    short	    x;
	    short	    y;
	    short	    xOff; <---- 
	    short	    yOff;
	} XGlyphInfo;
https://refspecs.linuxbase.org/LSB_4...der-ddefs.html
 
Old 03-08-2020, 02:36 PM   #5
Portal
LQ Newbie
 
Registered: Jun 2019
Posts: 27

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
it is in the link.
btw I have no idea about anything. I googled this remember. you might be surprised at how much information is out there if you search for it first. just saying...
Code:
typedef struct _XGlyphInfo {
	    unsigned short  width;
	    unsigned short  height;
	    short	    x;
	    short	    y;
	    short	    xOff; <---- 
	    short	    yOff;
	} XGlyphInfo;
https://refspecs.linuxbase.org/LSB_4...der-ddefs.html
yea...I've looked at these links before, but they never really explained what the xOff/yOff attributes really are... thanks for the help anyway.
 
Old 03-08-2020, 03:15 PM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,243

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322
Seems fairly obvious to me that they're offsets.
 
Old 03-08-2020, 03:18 PM   #7
Portal
LQ Newbie
 
Registered: Jun 2019
Posts: 27

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dugan View Post
Seems fairly obvious to me that they're offsets.
offsets to what...? I also don’t recall the concept of offsets being used in glyph metrics
 
Old 03-08-2020, 03:24 PM   #8
SoftSprocket
Member
 
Registered: Nov 2014
Posts: 399

Rep: Reputation: Disabled
Quote:
Originally Posted by Portal View Post
yea...I've looked at these links before, but they never really explained what the xOff/yOff attributes really are... thanks for the help anyway.
I think (but don't know) that they are used for width (xOff) and height (yOff) in some manner. This is based on how I've seem them being used - not on something documented.
 
Old 03-08-2020, 06:13 PM   #9
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,243

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322
Found a couple links that haven't been posted yet. This, in particular, seems to have an answer:

Quote:
xOff, yOff is the normal spacing to the next glyph.
https://seesaawiki.jp/w/smnb/d/X%20W...#content_4_4_7

Googling for that phrase got me this, which actually expands on it quite a bit:

https://bugzilla.mozilla.org/show_bug.cgi?id=128153#c25

There's also this:

https://keithp.com/pipermail/fontcon...ch/000125.html

Last edited by dugan; 03-08-2020 at 06:26 PM.
 
2 members found this post helpful.
Old 03-08-2020, 10:43 PM   #10
Portal
LQ Newbie
 
Registered: Jun 2019
Posts: 27

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dugan View Post
Found a couple links that haven't been posted yet. This, in particular, seems to have an answer:



https://seesaawiki.jp/w/smnb/d/X%20W...#content_4_4_7

Googling for that phrase got me this, which actually expands on it quite a bit:

https://bugzilla.mozilla.org/show_bug.cgi?id=128153#c25

There's also this:

https://keithp.com/pipermail/fontcon...ch/000125.html
Thank you for the finds. The links are helpful.
 
1 members found this post helpful.
  


Reply

Tags
xlib



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Plain Old Documentation (pod) – write documentation for Perl, Perl software, and Perl modules LXer Syndicated Linux News 0 10-05-2018 09:12 AM
Magento Install: dom extension and mcrypt extension mjdb Linux - Newbie 0 02-21-2009 02:58 AM
Linux file extension vs Dos file Extension? manaa Linux - Newbie 6 02-12-2009 04:19 PM
direct rendering: Yes :: (but applications say direct rendering is not possible?) AbsoluteMonkey Fedora 0 12-16-2008 09:44 PM
Where to find documentation about ``X Shape Extension''? unsigned_nerd Linux - Software 0 01-08-2005 10:21 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration