首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏技术人生黄勇

    智谱Glyph:把信息,压缩成图片

    昨天,DeepSeek 发了 OCR 用图片来理解信息,缩减上下文 低清无码,不影响识别《通过视觉,确实可以压缩信息》 刚刚的,智谱发了 Glyph 把信息压缩成图片,缩减上下文 Git:https:/ /github.com/thu-coai/Glyph 公众号后台回复:Glyph,获取报告论文 pdf 两个团队,同一时间 把目光投到了「用视觉方式,表达信息」 领域一致,路径互补 Karpathy 今天也发推了 Karpathy 前两天录了个很棒的播客:Andrej Karpathy 2小时访谈:未来十年,没有 AGI,只有 Agent |附:中文版音频 Glyph 在做什么 Glyph 的新思路 把信息渲染成图像,然后用模型处理 对于纯文本输入 通过搜索的方式,找到效率最高的渲染方式 比如处理一本小说《简爱》 约 240K tokens 128K 窗口装不下,必须截断 Glyph 把整本小说渲染成图像 从而搜索最高效的视觉渲染方案 效果: 随机配置:40.91 分 人工配置:43.62 分 LLM 搜索配置:45.60 分 效果如何 在 LongBench 和 MRCR 上 Glyph 的表现和 Qwen3

    10110编辑于 2026-03-11
  • 来自专栏全栈程序员必看

    matplotlib解决中文乱码问题,或者RuntimeWarning: Glyph 20154 missing from current font.

    (没有找到字体文件) RuntimeWarning: Glyph 20154 missing from current font.

    58810编辑于 2022-07-19
  • 来自专栏韦东山嵌入式

    【硬核】韦东山:使用freetype显示一行文字

    新的关键点使用FT_Glyph来表示,可以使用这样的代码从slot中获得glyph: error = FT_Get_Glyph(slot , &glyph); FT_BBox FT_BBox结构体定义如下 可以使用以下代码从glyph中获得这些信息: FT_Glyph_Get_CBox(glyph, FT_GLYPH_BBOX_TRUNCATE, &bbox ); 针对上述流程,示例代码如下: ? ; 108 FT_Vector pen; 109 FT_Glyph glyph; 110 FT_GlyphSlot slot = face->glyph; 111 112 */ 136 error = FT_Get_Glyph(face->glyph, &glyph); 137 if (error) 138 { 139 (glyph, FT_GLYPH_BBOX_TRUNCATE, &glyph_bbox); 145 146 /* 更新外框 */ 147 if ( glyph_bbox.xMin

    2.4K10发布于 2020-09-30
  • 来自专栏算法与数据之美

    字体反爬之博X网实战

    base_dict={'glyph00009': 7, 'glyph00013': 2, 'glyph00018': 1, 'glyph00023': 6, 'glyph00028': 9, 'glyph00030 ': 8,'glyph00034': 4, 'glyph00039': 5, 'glyph00044': 3, 'glyph00048': 0} 通过get_new_name_list函数来筛选出有效的字体 {'glyph00002': 6, 'glyph00003': 1, 'glyph00004': 0, 'glyph00005': 4, 'glyph00006': 7, 'glyph00007': 5 , 'glyph00008': 8, 'glyph00009': 9, 'glyph00010': 3, 'glyph00011': 2} 接着为了对应编码与数字,我们需要重新建立新的字体映射表。

    90211发布于 2020-06-12
  • 来自专栏Golang语言社区

    转--每周一个GoLang设计模式之组合模式

    下表描述了Glyph的基本接口。 *, int) Virtual Void Remove(Glyph*) Virtual Void Remove(Glyph*) Virtual Glyph* Child(int) Virtual Glyph子类为了在窗口上呈现自己,必须重写父类Glyph的Draw方法,从而在屏幕窗口上呈现自己。 { Glyph }type Rectangle struct { Glyph }type Row struct { Glyph Childs []Appearancer } 下面是Appearancer接口的实现部分,通用接口的工作基本可以在Glyph类型中完成: func (g *Glyph) Draw(elemet Appearancer) { fmt.Println

    1.1K60发布于 2018-03-19
  • 来自专栏林德熙的博客

    dotnet C# 使用 FreeType 读取和绘制字体

    ; float width = face.Glyph.Metrics.Width.ToSingle(); float glyphTop = (float) face.Glyph.Metrics.HorizontalBearingY; float glyphBottom = (float) (face.Glyph.Metrics.Height - face.Glyph.Metrics.HorizontalBearingY); 以上的各个变量就是对于传入的字符的信息 将字体渲染到图片需要借助 GDI 部分的辅助,先调用 RenderGlyph ; float width = face.Glyph.Metrics.Width.ToSingle(); float glyphTop = (float) face.Glyph.Metrics.HorizontalBearingY; float glyphBottom = (float) (face.Glyph.Metrics.Height

    1.2K10编辑于 2024-04-25
  • 来自专栏字节流动

    OpenGL ES 文字渲染进阶--渲染中文字体

    FreeType 加载中文字符位图需要,先根据 Unicode 编码值查询位图的索引,然后根据索引获取到 FreeType 的 Glyph 对象,最后再将 FT_Glyph 转换为 FT_BitmapGlyph "); continue; } FT_Glyph glyph; FT_Get_Glyph(face->glyph, &glyph ); //Convert the glyph FT_Glyph_To_Bitmap(&glyph, ft_render_mode_normal, 0, 1 ); FT_BitmapGlyph bitmap_glyph = (FT_BitmapGlyph )glyph; FT_Bitmap& bitmap = bitmap_glyph->bitmap; // Generate texture GLuint texture; glGenTextures ->bitmap.width, face->glyph->bitmap.rows), glm::ivec2(face->glyph->bitmap_left, face->glyph->bitmap_top

    1.8K20发布于 2021-07-05
  • 来自专栏字节流动

    OpenGL ES 文字渲染进阶--渲染中文字体

    FreeType 加载中文字符位图需要,先根据 Unicode 编码值查询位图的索引,然后根据索引获取到 FreeType 的 Glyph 对象,最后再将 FT_Glyph 转换为 FT_BitmapGlyph "); continue; } FT_Glyph glyph; FT_Get_Glyph(face->glyph, &glyph FT_Glyph_To_Bitmap(&glyph, ft_render_mode_normal, 0, 1 ); FT_BitmapGlyph bitmap_glyph = (FT_BitmapGlyph )glyph; FT_Bitmap& bitmap = bitmap_glyph->bitmap; // Generate texture GLuint ->bitmap.width, face->glyph->bitmap.rows), glm::ivec2(face->glyph->bitmap_left, face-

    2.4K20发布于 2021-07-16
  • 来自专栏johnhuster

    java学习之构造器内部的多态方法的行为

    为了说明这个问题,下面以具体程序为例来讲述 class Glyph { void draw(){System.out.println("Glyph draw called")} Glyph() { System.out.println("Glyph draw 前"); //调用draw方法 draw(); System.out.println("Glyph draw 后"); } } // class RoundGlyph extends Glyph { private int radius=1; RoundGlyph(int r) public static void main(String args[]) { new RoundGlyph(5); } } //最后的输出结果: Glyph draw 前 RoundGlyph draw called,radius=0 Glyph draw 后 RoundGlyph 构造函数,radius=5 如果你所想跟结果一样,那么基本上不用往下看了

    30110编辑于 2022-03-28
  • 来自专栏优雅R

    医学统计与R语言:画一个姑娘陪着我,再画个花边的被窝

    Brands" [] "Font Awesome 5 Free Regular" 输入2: library(ggpubr) a <- waffle(c(), rows = 1, use_glyph = "ambulance", glyph_size = 15,color="red",legend_pos="none") b <- waffle(c(), rows = 1, use_glyph = "heartbeat", glyph_size = 15,color="blue",legend_pos="none") ggarrange(a, b, nrow = 1, ncol = 2) 结果 输入3: iron(waffle( c('Yes=70%' = 70, 'No=30%' = 30), rows = 4, use_glyph ="male", glyph_size = 10 ="female", glyph_size = 10 , color=c("#f34323","gray70" ),legend_pos="bottom") ) 结果3: ?

    52210发布于 2020-07-06
  • 来自专栏不温卜火

    爬虫入门经典(二十二) | 破解base64加密之爬取安居客

    ['glyph00000', 'glyph00001', 'glyph00002', 'glyph00003', 'glyph00004', 'glyph00005', 'glyph00006', 'glyph00007 ', 'glyph00008', 'glyph00009', 'glyph00010'] {38006: 'glyph00008', 38287: 'glyph00005', 39228: 'glyph00003 ', 39499: 'glyph00002', 40506: 'glyph00010', 40611: 'glyph00004', 40804: 'glyph00007', 40850: 'glyph00001 ', 40868: 'glyph00006', 40869: 'glyph00009'} 发现规律: 'glyph00001‘对应的是数字0,'glyph00002'对应数字1… 38006是10进制

    2.3K10发布于 2020-11-24
  • 来自专栏盟主来了

    2021.12.12日报:非ComplexPath下,skia显示黑体字有问题

    跟了一下,主要是Font::buildGlyphBuffer这里建立的glyph和ComplexPath不同。 非ComplexPath的glyph是0,而ComplexPath是980.导致后面: SkGlyphCache::allocateNewGlyph、 SkScalerContext_GDI::generateMetrics 、 GlyphFindAndPlaceFullPixel::findAndPositionGlyph、 SkDraw::drawPosText的glyph.fWidth 获取的glyph对应的宽度不同。 非ComplexPath的glyph是0,获取的宽度是14,而ComplexPath的宽度是0. 目前暂时不清楚具体怎么回事。但因为可以规避这问题,就不管了。

    47520编辑于 2021-12-14
  • 来自专栏生信修炼手册

    circos 可视化手册-scatter plot 篇

    glyph表示点的形状,circle代表圆形,triangle代表三角形,rectangle代表矩形;glyph_size控制点的大小;fill_color控制点的填充色,stroke_color控制边框的颜色 = circle glyph_size = 10max = 0.013 min = 0 r1 = 0.95r r0 = 0.65r# optional fill_color = red glyph = triangle </rule></rules></plot># the second plot is a crop of the = rectangle glyph_size = 8max = 0.013 min = 0.007 r1 = 1.175r r0 = 1.075r = rectangle glyph_size = 8max = 0.0015 min = 0.000 r1 = 0.60r r0 = 0.35r<

    1.3K10发布于 2020-05-11
  • 来自专栏程序员的诗和远方

    在React Native中优雅的使用iconfont

    ; if(typeof glyph === 'number') { glyph = String.fromCharCode(glyph); } size = size || DEFAULT_ICON_SIZE }{this.props.children}</Text>); } 其中,最重要的四句话_(我本来写的是两句话,结果越看越多)_: var glyph = glyphMap[name] || '?' ; 把刚才的6xxxx找到; glyph = String.fromCharCode(glyph); 转成Unicode编码字符串; styleDefaults.fontFamily = fontReference ; 指定字符集; return (<Text {...props}>{glyph}{this.props.children}</Text>); 把Unicode字符写到Text组件中。 一个最基本的字体文件一定会包含以下表: cmap: Char­ac­ter to glyph map­ping head: Font header hhea: Hor­i­zon­tal header

    18.5K40发布于 2018-05-02
  • 来自专栏独行猫a的沉淀积累总结

    freetype的交叉编译及在嵌入式linux上的简单使用及改变字体背景和颜色

    加载字符图像 FT_Load_Glyph(face, charIdx, FT_LOAD_DEFAULT); if (face->glyph->format == FT_GLYPH_FORMAT_OUTLINE 获取字符位图 if (face->glyph->format ! = FT_GLYPH_FORMAT_BITMAP) { FT_Render_Glyph(face->glyph, FT_RENDER_MODE_NORMAL); } // 7. startY+face->size->metrics.ascender/64-face->glyph->bitmap_top, face->glyph->bitmap); startX += face->glyph->advance.x/64; } 以下为一个简单的完整测试用例及makefile。

    6.4K10发布于 2020-12-16
  • 来自专栏全志嵌入式那些事

    百问LCD Framebuffer应用开发 - freetype搭建与使用

    关键点(glyph)存在字体文件中,Windows使用的字体文件在FONTS目录下,扩展名为TTF的都是矢量字库,本次使用实验使用的是新宋字体simsun.ttc。 字体文件结构如上图 ​ Charmaps表示字符映射表,字体文件可能支持哪一些编码,GBK,UNICODE,BIG5还是别的编码,如果字体文件支持该编码,跟进编码,通过charmap,找到对应的glyph : glyph_index = FT_Get_Char_Index(face,charcode) ⑥根据glyph_index取出glyph:FT_Load_Glyph(face,glyph_index ) ⑦转为位图:FT_Render_Glyph ⑧移动或旋转:FT_Set_Transform 1.5.2 在LCD上显示一个矢量字体 我们可以参考上图位置的c程序,编写程序。 ,即关键点集 程序文件:freetype_show_font.c 4877 slot = face->glyph; ④设置像素点大小,24*24 程序文件:freetype_show_font.c

    48010编辑于 2024-11-26
  • 来自专栏攻城狮与产品喵

    【服务器】本地服务器wampmanager服务器离线

    WAMP打开默认页 Localhost和phpMyadmin的端口: 1、打开wamp目录下wampmanager.tpl文件 2、找到 Parameters: "http://localhost/"; Glyph : 5 Parameters: "http://localhost/phpmyadmin/"; Glyph: 5 改成 Parameters: http://localhost:801/; Glyph : 5 Parameters: "http://localhost:801/phpmyadmin/"; Glyph: 5 3、保存,重启wamp所有服务即可。

    2.3K00编辑于 2025-03-13
  • 来自专栏小徐学爬虫

    如何在Pyqt中渲染使用svggraphicsItem的SVG字形?

    _getUseTags(dom) for glyph in glyphs.keys(): print(glyph) nl = self.makeNewList(glyphs [glyph].split(' ')) u = self. _matchUseGlyphs(use, glyph) for u2 in u: print(u2, 'brefore') self. def _getUseTags(self, dom): return dom.getElementsByTagName('use')​def _matchUseGlyphs(self, use, glyph i in use: print(i.getAttribute('xlink:href')) if i.getAttribute('xlink:href') == '#'+glyph

    4.1K20编辑于 2024-09-04
  • 来自专栏路过君BLOG from CSDN

    extjs750 window标题工具按钮图标不显示异常处理

    #{$prefix}tool-close { color: $window-close-glyph-color; } } } 源码 neutral主题panel tool样式 overflow: hidden; width: $tool-size; height: $tool-size; margin: 0; color: $tool-glyph-color ; // $tool-glyph-color: dynamic(#fff); text-align: center; @if $tool-opacity ! #{$prefix}tool-close { color: $window-close-glyph-color; } } }

    84150编辑于 2022-01-10
  • 来自专栏字节流动

    OpenGL ES 文字渲染方式有几种?

    glyph.png 那么多属性其实不用刻意取记住,这里只是作为概念性了解。 // Size of glyph glm::ivec2 bearing; // Offset from baseline to left/top of glyph GLuint advance , GL_UNSIGNED_BYTE, face->glyph->bitmap.buffer ); // ->bitmap.width, face->glyph->bitmap.rows), glm::ivec2(face->glyph->bitmap_left, face- >glyph->bitmap_top), static_cast<GLuint>(face->glyph->advance.x) }; m_Characters.insert

    2.8K31发布于 2021-07-16
领券