亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? ttffont.c

?? Ming is a library for generating Macromedia Flash files (.swf), written in C, and includes useful ut
?? C
字號(hào):
/**************************************************************************** * *  Copyright (C) 2005-2006 "Stuart R. Anderson" <anderson@netsweng.com> *  Copyright (C) 2007 Klaus Rechert * *  This program is free software; you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *  the Free Software Foundation; either version 2 of the License, or *  (at your option) any later version. * *  This program is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *  GNU General Public License for more details. * *  You should have received a copy of the GNU General Public License *  along with this program; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA * ****************************************************************************/#include "ming_config.h"#if USE_FREETYPE#include <assert.h>#include <stdio.h>#include <string.h>#include <stdlib.h>#include <ctype.h>#include <sys/types.h>#include <ft2build.h>#include FT_FREETYPE_H#include FT_GLYPH_H#include FT_SFNT_NAMES_H#include FT_TRUETYPE_IDS_H#include FT_OUTLINE_H// Methods of FT_Outline_Funcs take a 'const FT_Vector*' in 2.2// and a non-const one in 2.1, so we use an FT_CONST macro to// support both#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR < 2#define FT_CONST #else#define FT_CONST const#endif#include "shape.h"#include "font.h"struct outl_data{	SWFShape shape;	double ratio_EM;}; static intoutl_moveto(FT_CONST FT_Vector *to, void *user){	struct outl_data *data = (struct outl_data *)user;	SWFShape shape = data->shape;	double ratio_EM = data->ratio_EM;	int dx = (int)(to->x*ratio_EM);	int dy = -(int)(to->y*ratio_EM);	SWFShape_moveScaledPenTo(shape, dx, dy);		return 0;}static intoutl_lineto(FT_CONST FT_Vector *to, void *user){	struct outl_data *data = (struct outl_data *)user;	SWFShape shape = data->shape;	double ratio_EM = data->ratio_EM;	int x = (int)(to->x*ratio_EM);	int y = -(int)(to->y*ratio_EM);	SWFShape_drawScaledLineTo(shape, x, y);	return 0;}static intoutl_conicto(FT_CONST FT_Vector *ctl, FT_CONST FT_Vector *to, void *user){	struct outl_data *data = (struct outl_data *)user;	SWFShape shape = data->shape;	double ratio_EM = data->ratio_EM;	int cx = (int)(ctl->x*ratio_EM);	int cy = -(int)(ctl->y*ratio_EM);	int ax = (int)(to->x*ratio_EM);	int ay = -(int)(to->y*ratio_EM);	SWFShape_drawScaledCurveTo(shape, cx, cy, ax, ay);	return 0;}static intoutl_cubicto(FT_CONST FT_Vector *ctl1, FT_CONST FT_Vector *ctl2,             FT_CONST FT_Vector *to, void *user){	FT_Vector midpnt;	int cx, cy, ax, ay;	struct outl_data *data = (struct outl_data *)user;	SWFShape shape = data->shape;	double ratio_EM = data->ratio_EM;	/* This is handled by breaking the cubic into 2 conic segments */	midpnt.x=(ctl1->x+ctl2->x)/2;	midpnt.y=(ctl1->y+ctl2->y)/2;	/* First half */	cx = (int)(ctl1->x*ratio_EM);	cy = -(int)(ctl1->y*ratio_EM);	ax = (int)(midpnt.x*ratio_EM);	ay = -(int)(midpnt.y*ratio_EM);	SWFShape_drawScaledCurveTo(shape, cx, cy, ax, ay);	/* Second half */	cx = (int)(ctl2->x*ratio_EM);	cy = -(int)(ctl2->y*ratio_EM);	ax = (int)(to->x*ratio_EM);	ay = -(int)(to->y*ratio_EM);	SWFShape_drawScaledCurveTo(shape, cx, cy, ax, ay);	return 0;}static FT_Outline_Funcs ft_outl_funcs = {	outl_moveto,	outl_lineto,	outl_conicto,	outl_cubicto,	0,	0};	static void readGlyphs(SWFFont font, FT_Face face){	int glyphCount = 0;	FT_UInt gindex;	FT_ULong charcode;	double ratio_EM = 1024.0 / face->units_per_EM;	font->shapes = (SWFShape *)malloc(sizeof(SWFShape) * face->num_glyphs);	font->advances = (short *)malloc(sizeof(short) * face->num_glyphs);	font->glyphToCode = (unsigned short *)malloc(sizeof(unsigned short) * face->num_glyphs);	charcode = FT_Get_First_Char(face, &gindex );	while ( gindex != 0 ) 	{		struct outl_data data;		if( FT_Load_Glyph(face, gindex, FT_LOAD_NO_BITMAP|FT_LOAD_NO_SCALE)) 		{			SWF_warn("readGlyphsTTF: Can't load glyph %d, skipped\n", gindex);			charcode = FT_Get_Next_Char(face, charcode, &gindex);			continue;		}				data.shape = newSWFGlyphShape();		data.ratio_EM = ratio_EM;			if(FT_Outline_Decompose(&(face->glyph->outline), 			&ft_outl_funcs, &data)) 		{			SWF_warn("readGlyphsTTF: Can't decompose outline for glyph %d\n", gindex);			destroySWFShape(data.shape);			charcode = FT_Get_Next_Char(face, charcode, &gindex);			continue;		}		font->shapes[glyphCount] = data.shape;		font->glyphToCode[glyphCount] = charcode;		font->advances[glyphCount] = (short)(face->glyph->advance.x * ratio_EM);		if(charcode > 255)			font->flags |= SWF_FONT_WIDECODES;		charcode = FT_Get_Next_Char(face, charcode, &gindex);		glyphCount++;	}	font->nGlyphs = glyphCount;	if(font->nGlyphs > 255) // XXX: very simple estimation right now		font->flags |=  SWF_FONT_WIDEOFFSETS;}static SWFFont loadFontFromFace(FT_Face face){	// FT_CharMap charmap = NULL;	SWFFont font;	double ratio_EM;	/*	for(i=0; i < face->num_charmaps; i++) 	{		printf("map %d encoding pid=%d eid=%d\n", i,			face->charmaps[i]->platform_id,			face->charmaps[i]->encoding_id);		if( face->charmaps[i]->platform_id == TT_PLATFORM_MACINTOSH &&			face->charmaps[i]->encoding_id == TT_MAC_ID_ROMAN ) 		{			charmap = face->charmaps[i];			break;		}	}		if( charmap == NULL ) 	{		SWF_warn("loadSWFFontTTF: Unable to find an ANSI charactermap.");		goto error_face;	}	FT_Set_Charmap(face, charmap);	*/	font = newSWFFont();	font->flags = SWF_FONT_WIDECODES | SWF_FONT_HASLAYOUT;	font->name = strdup(face->family_name);	font->langCode = 0;	if( face->style_flags & FT_STYLE_FLAG_BOLD) 		font->flags |= SWF_FONT_ISBOLD ; 	if( face->style_flags & FT_STYLE_FLAG_ITALIC ) 		font->flags |= SWF_FONT_ISITALIC;		readGlyphs(font, face); 		ratio_EM = 1024.0 / face->units_per_EM;	font->ascent = (short)(face->ascender * ratio_EM);	font->descent = (short)(face->descender * -ratio_EM);	font->leading = ((face->height-face->ascender + face->descender) * ratio_EM);	SWFFont_buildReverseMapping(font);	return font;}SWFFontCollection loadTTFCollection(const char *filename){	FT_Error error;	FT_Library library;	FT_Face face;	int numFaces, i;	SWFFontCollection collection;	SWFFont font;	if( FT_Init_FreeType( &library ) ) {		SWF_warn("loadSWFFontTTF: FreeType initialization failed\n");		return NULL;	}	if( (error = FT_New_Face(library, filename, 0, &face )) ) 	{		if ( error == FT_Err_Unknown_File_Format )			SWF_warn("loadTTFCollection: %s has format unknown to FreeType\n",				filename);		else			SWF_warn("loadTTFCollection: Cannot access %s ****\n", filename);		goto error_ft;	}	numFaces = face->num_faces;	collection = newSWFFontCollection();		font = loadFontFromFace(face);	SWFFontCollection_addFont(collection, font);	for(i = 1; i < numFaces; i++)	{		if((error = FT_New_Face(library, filename, i, &face ))) 			goto error_ft;		font = loadFontFromFace(face);		SWFFontCollection_addFont(collection, font);	}	return collection;error_ft:	FT_Done_FreeType(library);	return NULL;	}SWFFont loadSWFFontTTF(const char *filename){	FT_Error error;	FT_Library library;	FT_Face face;	SWFFont font;			if( FT_Init_FreeType( &library ) ) {		SWF_warn("loadSWFFontTTF: FreeType initialization failed\n");		return NULL;	}	if( (error = FT_New_Face( library, filename, 0, &face )) ) 	{		if ( error == FT_Err_Unknown_File_Format )			SWF_warn("loadSWFFontTTF: %s has format unknown to FreeType\n",				filename);		else			SWF_warn("loadSWFFontTTF: Cannot access %s ****\n", filename);		goto error_ft;	}		font = loadFontFromFace(face);	FT_Done_Face(face);	FT_Done_FreeType(library);	return font;error_ft:	FT_Done_FreeType(library);	return NULL;}#endif // USE_FREETYPE

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91亚洲精品久久久蜜桃网站| 蜜臀久久99精品久久久画质超高清| 国产九色精品成人porny| 久久这里都是精品| 国产成人在线视频网站| 中文字幕一区三区| 欧美性受xxxx| 日韩av电影免费观看高清完整版| 日韩午夜精品视频| 国产成人在线视频免费播放| 日韩一区中文字幕| 欧美日韩专区在线| 蜜乳av一区二区| 国产日韩精品一区二区三区在线| 国产iv一区二区三区| 一区二区三区四区激情| 91精品国产高清一区二区三区蜜臀 | 久久aⅴ国产欧美74aaa| 久久人人97超碰com| 99久久精品免费精品国产| 亚洲成a人v欧美综合天堂下载| 欧美福利电影网| 成人美女视频在线观看18| 一区二区久久久久久| www国产成人| 欧美日韩一级片在线观看| 黑人巨大精品欧美黑白配亚洲| 国产精品久久久久永久免费观看 | av不卡在线观看| 婷婷丁香久久五月婷婷| 中文字幕乱码亚洲精品一区| 欧美三级视频在线观看| 国产自产v一区二区三区c| 一区二区成人在线视频| 日韩你懂的在线播放| 成人午夜电影久久影院| 奇米一区二区三区| 自拍偷拍国产精品| 日韩免费观看高清完整版| 99精品视频一区| 久久超碰97中文字幕| 亚洲一区二区精品久久av| 久久综合给合久久狠狠狠97色69| 欧美日韩精品欧美日韩精品一 | 国产成人在线色| 日本不卡123| 一区二区三区91| 中文字幕一区二区在线观看| 精品国产免费久久| 777午夜精品免费视频| 一本久久精品一区二区| 国产成人精品免费| 韩日av一区二区| 日韩中文字幕不卡| 亚洲高清视频在线| 一区二区三区在线免费| 国产精品热久久久久夜色精品三区 | 激情五月婷婷综合网| 亚洲电影激情视频网站| 亚洲色图欧美偷拍| 欧美高清在线一区二区| 精品播放一区二区| 日韩一区二区三区电影| 7777精品伊人久久久大香线蕉超级流畅 | 国产乱人伦偷精品视频免下载| 亚洲va在线va天堂| 夜夜嗨av一区二区三区| 亚洲另类在线制服丝袜| 中文字幕国产一区| 国产三级精品视频| 国产欧美精品国产国产专区| www欧美成人18+| 久久久亚洲国产美女国产盗摄| 精品盗摄一区二区三区| 日韩免费视频一区二区| 日韩视频永久免费| 精品美女一区二区| 久久婷婷一区二区三区| 精品99999| 久久久久国色av免费看影院| 久久嫩草精品久久久精品一| 久久这里只有精品视频网| 国产欧美一区二区三区在线老狼| 久久久久国产精品厨房| 日本一区二区三区国色天香| 国产精品五月天| 国产精品女上位| 亚洲美女少妇撒尿| 亚洲午夜久久久久久久久电影院| 亚洲国产综合色| 蜜臀av性久久久久蜜臀aⅴ四虎 | 972aa.com艺术欧美| 欧洲精品一区二区| 欧美日韩不卡在线| 欧美一级黄色大片| 国产欧美日韩精品a在线观看| 国产精品色噜噜| 一区二区三区欧美在线观看| 亚洲18色成人| 国精产品一区一区三区mba视频| 国产一区二区在线电影| 97精品视频在线观看自产线路二| 91黄视频在线| 日韩一区二区精品葵司在线| 久久久影院官网| 国产精品二三区| 肉丝袜脚交视频一区二区| 极品少妇xxxx精品少妇偷拍| 成人免费视频视频| 4438x亚洲最大成人网| 久久色在线观看| 一区二区欧美国产| 久热成人在线视频| 97精品久久久午夜一区二区三区| 7777精品伊人久久久大香线蕉完整版| 日韩欧美专区在线| 亚洲人成人一区二区在线观看| 青青草97国产精品免费观看 | 欧美mv和日韩mv的网站| 椎名由奈av一区二区三区| 日本sm残虐另类| www.日韩在线| 日韩视频一区二区三区| 中文字幕一区在线| 精品一区二区三区av| 在线观看成人小视频| 久久久一区二区三区| 日韩影院在线观看| 成人av资源在线| 7777精品伊人久久久大香线蕉| 国产精品理论在线观看| 久久99久久精品欧美| 欧美影院精品一区| 中文字幕一区二区三区不卡在线| 亚洲国产日产av| 成人av在线网站| 欧美大片一区二区三区| 夜夜爽夜夜爽精品视频| 国产+成+人+亚洲欧洲自线| 日韩午夜在线观看视频| 亚洲午夜私人影院| 91丝袜国产在线播放| 国产欧美视频一区二区三区| 久久精品99国产精品日本| 在线亚洲欧美专区二区| 中文字幕日本乱码精品影院| 国产在线看一区| 日韩欧美卡一卡二| 婷婷一区二区三区| 欧美日韩高清影院| 尤物视频一区二区| 91亚洲国产成人精品一区二区三| 亚洲国产精品成人综合| 国产在线精品国自产拍免费| 91精品国产91久久久久久最新毛片 | 国产精品一二三在| 日韩视频免费观看高清在线视频| 水蜜桃久久夜色精品一区的特点| 91久久精品网| 亚洲欧美视频一区| 99久久99久久精品免费观看| 国产精品视频yy9299一区| 国产精品一区在线观看乱码| 久久人人超碰精品| 国产剧情一区二区| 国产日韩高清在线| 粉嫩av一区二区三区在线播放| 久久无码av三级| 韩国中文字幕2020精品| 26uuu国产在线精品一区二区| 国产伦精一区二区三区| 精品国产免费视频| 国产成人免费9x9x人网站视频| 国产香蕉久久精品综合网| 春色校园综合激情亚洲| 中文字幕一区二区三区蜜月| 97久久精品人人爽人人爽蜜臀| 亚洲欧美激情在线| 欧美三级日韩三级| 日韩一区精品字幕| 精品久久久久一区| 国产成人午夜99999| 亚洲欧美在线视频| 91久久线看在观草草青青| 亚洲综合丁香婷婷六月香| 欧美日本视频在线| 久久99久久精品| 国产欧美一区二区精品性色超碰| 99热精品一区二区| 亚洲高清视频的网址| 欧美电影免费观看高清完整版在线 | 国产一区二区福利视频| 中文字幕精品在线不卡| 91同城在线观看| 奇米色一区二区三区四区| 欧美精品一区二区三区四区| 国产a区久久久| 午夜精品久久久久久久久久久| 欧美成人性战久久| 99精品欧美一区二区蜜桃免费|