Bug 3424

Summary: next/prev borked when startglyph > 0xffff
Product: xorg Reporter: James Cloos <cloos>
Component: App/otherAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: xorg-team
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 1690    
Attachments:
Description Flags
xfd.c patch to not maks start glyph index AND 0xFFFF
cloos: 6.8-branch?
unmask row to allow row*0xff+col == start none

Description James Cloos 2005-05-29 11:30:08 UTC
When xfd(1x) was updated to support Xft and fonts w/ glyph indices > 0xffff one
line was missed.  In xfd.c / change_page() start is declared inline as Dimension.
As such, all changes to the start glyph's index are masked & 0xffff.

The attached diff corrects this by a s/Dimension/unsigned long/ on that line.
Comment 1 James Cloos 2005-05-29 11:31:35 UTC
Created attachment 2790 [details] [review]
xfd.c patch to not maks start glyph index AND 0xFFFF
Comment 2 James Cloos 2005-05-29 11:33:59 UTC
Forgot to add:

I made the diff against the version under xapps HEAD.  It should apply against
every version in the tree that may end up in a release....
Comment 3 James Cloos 2005-05-29 12:02:50 UTC
There is one more stop in change_page() that needs updating.  It has this code:

    if (!page || newstart != oldstart) {
	unsigned int row = (unsigned int) ((newstart >> 8) & 0xff);
	unsigned int col = (unsigned int) (newstart & 0xff);

	XtSetArg (arg, XtNlabel, buf);
	sprintf (buf, xfd_resources.start_format, newstart, row, col);

row,col are still limited to < 65536.

The default format string uses %d for row and col, so if row isn't masked
with & 0xff it'll be almost valid.

That is probably the only backward-compatable way to do it, given that the
format string is done as a resource....  
Comment 4 James Cloos 2005-05-29 12:14:56 UTC
Created attachment 2791 [details] [review]
unmask row to allow row*0xff+col == start
Comment 5 James Cloos 2005-06-05 14:10:32 UTC
changed product from xapps to xorg and reassigned to owner of xorg (team I presume?)
Comment 6 Adam Jackson 2005-08-28 12:40:04 UTC
applied to head, thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.