Skip to content

Instantly share code, notes, and snippets.

// 8 january 2017
import CoreFoundation
import CoreGraphics
import CoreText
let our_CGFLOAT_MAX: CGFloat = CGFloat.greatestFiniteMagnitude
func iterative() {
var s = "This is a test string."
for _ in 0..<10 {
import CoreFoundation
import CoreGraphics
import CoreText
var font = CTFontCreateWithName(("Lucida Grande" as! CFString), 12, nil)
var attrs = CFDictionaryCreateMutable(nil, 0,
[kCFCopyStringDictionaryKeyCallBacks],
[kCFTypeDictionaryValueCallBacks])
CFDictionaryAddValue(attrs,
Unmanaged.passUnretained(kCTFontAttributeName).toOpaque(),
@andlabs
andlabs / whatsthefont-files-slant.c
Last active January 3, 2017 08:30 — forked from chearon/whatsthefont.c
Compare FT and OSX font weights for a font
#include <CoreFoundation/CoreFoundation.h>
#include <CoreGraphics/CoreGraphics.h>
#include <CoreText/CoreText.h>
int
main(int argc, char** argv)
{
if (argc == 2) {
char* filepath = *(argv+1);
// 3 december 2016
#include "../ui.h"
#include "uipriv.h"
struct uiAttributedString {
char *s;
size_t len;
// TODO attributes
// 3 december 2016
#include "../ui.h"
#include "uipriv.h"
struct uiAttributedString {
char *s;
size_t len;
// TODO attributes
class Qemu < Formula
desc "x86 and PowerPC Emulator"
homepage "http://wiki.qemu.org"
head "https://github.com/abligh/qemu.git", :branch => "qemu-hypervisor-framework"
depends_on "pkg-config" => :build
depends_on "libtool" => :build
depends_on "jpeg"
depends_on "libpng" => :recommended
commit f46edd097b7d394f574ff10fd798d918b66c68eb
Author: Pietro Gagliardi <pietro10@mac.com>
Date: Fri Oct 21 16:35:46 2016 -0400
uiDrawTextWeightUtraBold.
diff --git a/README.md b/README.md
index 44c2451..9264fd8 100644
--- a/README.md
+++ b/README.md
// 28 february 2014
package main
/*
These are wrapper functions for the functions in bleh_darwin.m to wrap around stdint.h type casting.
This will eventually be expanded to include the other Objective-C runtime support functions.
*/
// #cgo LDFLAGS: -lobjc -framework Foundation
struct myPopover {
GtkWidget *popover;
GtkWidget *searchEntry;
GMenuModel *items;
};
struct myPopover *newPopover(void)
{
struct myPopover *p;
{
typedef D2D1_SIZE_F *(ID2D1RenderTarget::*__stdcall GetSizeF)(D2D1_SIZE_F *);
GetSizeF gs;
gs = (GetSizeF) (&(rt->GetSize));
(rt->*gs)(&size);
}