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
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);
}
"C:/Program Files (x86)/CMake/bin/cmake.exe" -HE:/github.com/andlabs/libui -BE:/github.com/andlabs/libui/build --check-build-system CMakeFiles/Makefile.cmake 0
gmake -f CMakeFiles/Makefile2 examples
gmake[1]: Entering directory 'E:/github.com/andlabs/libui/build'
"C:/Program Files (x86)/CMake/bin/cmake.exe" -HE:/github.com/andlabs/libui -BE:/github.com/andlabs/libui/build --check-build-system CMakeFiles/Makefile.cmake 0
"C:/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_start E:/github.com/andlabs/libui/build/CMakeFiles 67
gmake -f CMakeFiles/Makefile2 examples/CMakeFiles/examples.dir/all
gmake[2]: Entering directory 'E:/github.com/andlabs/libui/build'
gmake -f CMakeFiles/libui.dir/build.make CMakeFiles/libui.dir/depend
gmake[3]: Entering directory 'E:/github.com/andlabs/libui/build'
"C:/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_depends "Unix Makefiles" E:/github.com/andlabs/libui E:/github.com/andlabs/libui E:/github.com/andlabs/libui/build E:/github.com/andlabs/libui/build E:/github.com/