Skip to content

ext/gd disable gh13082 test for travis. #13208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

devnexen
Copy link
Member

The sample file is for little endian architectures.

The sample file is for little endian architectures.
Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good for PHP's side.
But I do wonder about libgd's side of this. If endianness makes a file uninterpretable then it sounds like a bug in libgd to me. Not saying we should do anything about it, but just saying.

@devnexen devnexen closed this in 8d4e177 Jan 21, 2024
@cmb69
Copy link
Member

cmb69 commented Jul 10, 2024

But I do wonder about libgd's side of this.

There is none. imageloadfont() is a PHP invention, and the platform dependency is documented:

php-src/ext/gd/gd.c

Lines 545 to 556 in d59691c

/* Only supports a architecture-dependent binary dump format
* at the moment.
* The file format is like this on machines with 32-byte integers:
*
* byte 0-3: (int) number of characters in the font
* byte 4-7: (int) value of first character in the font (often 32, space)
* byte 8-11: (int) pixel width of each character
* byte 12-15: (int) pixel height of each character
* bytes 16-: (char) array with character data, one byte per pixel
* in each character, for a total of
* (nchars*width*height) bytes.
*/

I'm actually quite surprised that anybody still uses this in the 21st century.

@nielsdos
Copy link
Member

The SKIPIF description should be updated then for clarity. Thanks for the insight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants