Skip to content

Instantly share code, notes, and snippets.

@timsneath
Created April 24, 2020 03:11
Show Gist options
  • Select an option

  • Save timsneath/1846726e48ba0ebf1debf8a58acf2b5a to your computer and use it in GitHub Desktop.

Select an option

Save timsneath/1846726e48ba0ebf1debf8a58acf2b5a to your computer and use it in GitHub Desktop.
import 'dart:ffi';
class LOGFONT extends Struct {
// Should be (5 * 4) + (8 * 1) + (8 * 8) bytes = 92 bytes
// sizeOf<LOGFONT>() is 96 bytes
@Int32()
int lfHeight;
@Int32()
int lfWidth;
@Int32()
int lfEscapement;
@Int32()
int lfOrientation;
@Int32()
int lfWeight;
@Uint8()
int lfItalic;
@Uint8()
int lfUnderline;
@Uint8()
int lfStrikeOut;
@Uint8()
int lfCharSet;
@Uint8()
int lfOutPrecision;
@Uint8()
int lfClipPrecision;
@Uint8()
int lfQuality;
@Uint8()
int lfPitchAndFamily;
@Int32()
int lfFaceName1;
@Int32()
int lfFaceName2;
@Int32()
int lfFaceName3;
@Int32()
int lfFaceName4;
@Int32()
int lfFaceName5;
@Int32()
int lfFaceName6;
@Int32()
int lfFaceName7;
@Int32()
int lfFaceName8;
@Int32()
int lfFaceName9;
@Int32()
int lfFaceName10;
@Int32()
int lfFaceName11;
@Int32()
int lfFaceName12;
@Int32()
int lfFaceName13;
@Int32()
int lfFaceName14;
@Int32()
int lfFaceName15;
@Int32()
int lfFaceName16;
}
void main() {
print('sizeOf<LOGFONT>() is ${sizeOf<LOGFONT>()}');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment