在Netbeans8.0上开发php,设置字体为Consola后,发现中文显示是乱码的,经过修改jre的配置文件成功解决了这个问题。1.
进入jdk安装目录下/jre/lib文件夹,找到fontconfig.properties.src,拷贝为fontconfig.properties,修改此文件。...
分类:
Web程序 时间:
2014-05-23 11:32:29
阅读次数:
350
手机设备太多,分辨率也不一样,看到网上大部分的适应字体的方法是定义values320×480或value-hdpi方式去处理。采用第一种的就惨了,很多设备的分辨率是不一样的,难道要每种都定义吗?采用第二种的在平板电脑里没有效果。最后还是代码的方式方便快捷。。。Java代码1.//遍历设置字体
2.p...
分类:
移动开发 时间:
2014-05-16 20:04:54
阅读次数:
1654
TextView txtShuoming;
SpannableStringBuilder builder = new SpannableStringBuilder(getResources().getString(R.string.shuoming));
//1.设置字体颜色
builder.setSpan(new ForegroundColorSpan(...
分类:
其他好文 时间:
2014-05-15 05:46:49
阅读次数:
251
//创建按钮初始化UIButton*leftButton=[[UIButtonalloc]initWithFrame:CGRectMake(0,0,60,24)];//添加返回方法[leftButtonaddTarget:selfaction:@selector(backMainViewController)forControlEvents:UIControlEventTouchUpInside];//设置字体颜色,状态[leftButtonsetTitleColor..
分类:
其他好文 时间:
2014-05-15 00:36:08
阅读次数:
320
自适应页面的设计从开始就有很多需要注意的:1.
页面中关乎布局的元素都不设置绝对的宽和高,都按百分比来设置。2. 字体也使用相对大小的字体 如: body{font: normal 100%;}
字体大小事页面默认大小的100%,即16像素。 h2 {font-size:1.5em} h2标...
分类:
其他好文 时间:
2014-05-14 07:23:56
阅读次数:
245
应用程序中经常需要设置字体,例如office软件或者是其他的编辑器软件等等。这里主要涉及到如下几个概念:字体,字号以及风格(例如:粗体,斜体,下划线等等)。Qt里面也有对应的类。接下来我们主要对这几个类进行详细的说明,最后举例说明它们的应用。
1、Qt中相关的类:QFontDatabase、QFont、QFontInfo和QFontMetrics、QFontMetricsF;
(1)QFont...
分类:
其他好文 时间:
2014-05-04 09:29:54
阅读次数:
505
代码如下:JRadioButton useCache=new
JRadioButton("Use cache");// 初始化单选框useCache.setFont(new
Font("Arial",Font.PLAIN,16));// 设置字体JRadioButton noUseCache=new...
分类:
其他好文 时间:
2014-04-30 18:36:19
阅读次数:
504
可以指定单位:
setTextSize(int unit, int size)
TypedValue.COMPLEX_UNIT_PX : Pixels
TypedValue.COMPLEX_UNIT_SP : Scaled Pixels
TypedValue.COMPLEX_UNIT_DIP : Device Independent Pixels
mText.setTextSize(...
分类:
移动开发 时间:
2014-04-29 13:22:20
阅读次数:
345
文字格式设置:
字体颜色设置:
Program.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace ColorDialog
{
static class Program
{...
分类:
其他好文 时间:
2014-04-27 20:38:47
阅读次数:
576