Actually changing text size with OCaml Graphics

痴心易碎 提交于 2019-12-11 12:19:19

问题


I was wondering how to set text size in OCaml. I tried Graphics.set_text_size which should do the deal I guess.

But whether I put set_text_size 200 or set_text_size 20 doesn't change a thing…


回答1:


Graphics.set_text_size is not implemented yet. https://github.com/ocaml/ocaml/blob/trunk/otherlibs/graph/graphics.ml#L165 https://github.com/ocaml/ocaml/blob/trunk/otherlibs/graph/text.c#L36 https://github.com/ocaml/ocaml/blob/trunk/otherlibs/win32graph/draw.c#L350




回答2:


maybe for now, Graphics.set_text_size is not implemented yet.

But, you can use: set_font

set_font "-misc-dejavu sans mono-bold-r-normal--256-0-0-0-m-0-iso8859-1";

this can set font size



来源:https://stackoverflow.com/questions/19191127/actually-changing-text-size-with-ocaml-graphics

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!