You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bit 1: If set, the corresponding x-coordinate is 1 byte long. If not set, it is two bytes long. For the sign of this value, see the description of the X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR flag.
0x10
X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR
Bit 4: This flag has two meanings, depending on how the X_SHORT_VECTOR flag is set. If X_SHORT_VECTOR is set, this bit describes the sign of the value, with 1 equalling positive and 0 negative. If X_SHORT_VECTOR is not set and this bit is set, then the current x-coordinate is the same as the previous x-coordinate. If X_SHORT_VECTOR is not set and this bit is also not set, the current x-coordinate is a signed 16-bit delta vector.
If X_SHORT_VECTOR is not set, and X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR is set, how many bytes should be read from the xCoordinates array?
One interpretation: X_SHORT_VECTOR is not set, so "the corresponding x-coordinate... is two bytes long".
Another interpretation: X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR is set, so "the current x-coordinate is the same as the previous x-coordinate". Therefore, no bytes need to be read.
Apparently the correct answer is that no bytes should be read. The problem is that "the corresponding x-coordinate is two bytes long" is explicitly stated in the text, and "no bytes should be read" is not explicitly stated in the text (the fact that the current x-coordinate is the same is the previous does not imply anything about storage), so a correct implementation should discard the explicit meaning of the specification in preference for the implicit meaning.
Please make the correct interpretation "no bytes should be read" more explicit.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: b2a9a6a1-a9b9-0864-8982-322da821389e
Version Independent ID: a42612e3-dc1d-f980-fe4a-4880d1fd0086
You're correct: in the case X_SHORT_VECTOR is not set and X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR is set, then no bytes are read. This should be clarified.
Proposed revised description for X_SHORT_VECTOR flag:
Bit 1: If set, the corresponding x-coordinate is 1 byte long, and the sign is determined by the X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR flag. If not set, its interpretation depends on the X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR flag: If that other flag is set, the x-coordinate is the same as the previous x-coordinate, and no element is added to the xCoordinates array. If both flags are not set, the corresponding element in the xCoordinates array is two bytes and interpreted as a signed integer. See the description of the X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR flag for additional information.
Analogous wording will be used for Y_SHORT_VECTOR.
Consider these two simple glyph flag bits:
If X_SHORT_VECTOR is not set, and X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR is set, how many bytes should be read from the xCoordinates array?
X_SHORT_VECTOR
is not set, so "the corresponding x-coordinate... is two bytes long".X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR
is set, so "the current x-coordinate is the same as the previous x-coordinate". Therefore, no bytes need to be read.Apparently the correct answer is that no bytes should be read. The problem is that "the corresponding x-coordinate is two bytes long" is explicitly stated in the text, and "no bytes should be read" is not explicitly stated in the text (the fact that the current x-coordinate is the same is the previous does not imply anything about storage), so a correct implementation should discard the explicit meaning of the specification in preference for the implicit meaning.
Please make the correct interpretation "no bytes should be read" more explicit.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: